diff options
author | 2025-04-16 02:20:31 +0100 | |
---|---|---|
committer | 2025-04-16 02:21:43 +0100 | |
commit | 27ce81043a31e61d9e2bea88e4ea883d8e4a4b39 (patch) | |
tree | 89931db04aa47b66f985566b7903fe3085b6e793 | |
parent | 7621b76c7081049b6b93ee679cbd786dbb7d49a4 (diff) | |
download | sst-27ce81043a31e61d9e2bea88e4ea883d8e4a4b39.tar.gz sst-27ce81043a31e61d9e2bea88e4ea883d8e4a4b39.zip |
Fix major idiocy in inputhud (and hud kinda)
Also pointed out by bill. D'oh, guess I'm fired.
-rw-r--r-- | src/hud.c | 6 | ||||
-rw-r--r-- | src/inputhud.c | 1 |
2 files changed, 5 insertions, 2 deletions
@@ -97,8 +97,10 @@ typedef void (*VCALLCONV Paint_func)(void *); static Paint_func orig_Paint; void VCALLCONV hook_Paint(void *this) { int width, height; - hud_screensize(&width, &height); - if (this == toolspanel) EMIT_HudPaint(width, height); + if (this == toolspanel) { + hud_screensize(&width, &height); + EMIT_HudPaint(width, height); + } orig_Paint(this); } diff --git a/src/inputhud.c b/src/inputhud.c index 1ce919a..4e332c4 100644 --- a/src/inputhud.c +++ b/src/inputhud.c @@ -326,6 +326,7 @@ static void reloadfonts() { HANDLE_EVENT(HudPaint, int screenw, int screenh) { if (!con_getvari(sst_inputhud)) return; if_cold (screenw != lastw || screenh != lasth) reloadfonts(); + lastw = screenw; lasth = screenh; int basesz = screenw > screenh ? screenw : screenh; int boxsz = ceilf(basesz * 0.025f); if (boxsz < 24) boxsz = 24; |