From 27ce81043a31e61d9e2bea88e4ea883d8e4a4b39 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Wed, 16 Apr 2025 02:20:31 +0100 Subject: Fix major idiocy in inputhud (and hud kinda) Also pointed out by bill. D'oh, guess I'm fired. --- src/hud.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/hud.c') diff --git a/src/hud.c b/src/hud.c index 8c861aa..f402c15 100644 --- a/src/hud.c +++ b/src/hud.c @@ -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); } -- cgit v1.2.3-54-g00ecf