summaryrefslogtreecommitdiff
path: root/src/hud.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hud.c')
-rw-r--r--src/hud.c6
1 files changed, 4 insertions, 2 deletions
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);
}