Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spectator_hud: fix resolution change #3506

Merged

Conversation

keelefi
Copy link
Contributor

@keelefi keelefi commented Jul 30, 2024

Spectator HUD has the callin for resolution change (ViewResize) correctly. However, the reInit() that is called never ends (re)getting the font. Therefore, after a resolution change, the widget crashes:

Error in DrawGenesis(): [string "LuaUI/Widgets/gui_spectator_hud.lua"]:1252: attempt to use a deleted font

Fix by moving font (re)initialization from Initialize() to init().

Spectator HUD has the callin for resolution change (ViewResize)
correctly. However, the reInit() that is called never ends (re)getting
the font. Therefore, after a resolution change, the widget crashes:

    Error in DrawGenesis(): [string "LuaUI/Widgets/gui_spectator_hud.lua"]:1252: attempt to use a deleted font

Fix by moving font (re)initialization from Initialize() to init().
@Damgam Damgam merged commit 79d5e69 into beyond-all-reason:master Jul 31, 2024
@keelefi keelefi deleted the spectator-hud-fix-resolution-change branch July 31, 2024 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants