diff options
-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; |