From 36bf42af6f12f559cf97767f30364c970423f5b7 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Tue, 16 Apr 2024 02:54:40 +0200 Subject: [PATCH] allow negative values for window width/height --- src/winapi_hooks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/winapi_hooks.c b/src/winapi_hooks.c index e21815b..3388b47 100644 --- a/src/winapi_hooks.c +++ b/src/winapi_hooks.c @@ -1360,8 +1360,8 @@ HWND WINAPI fake_CreateWindowExA( /* Limit window size to max surface size (Dune2000 1.02) */ if (dwStyle & WS_POPUP) { - nWidth = min((DWORD)nWidth, (DWORD)16384); - nHeight = min((DWORD)nHeight, (DWORD)16384); + nWidth = min(nWidth, 16384); + nHeight = min(nHeight, 16384); } return real_CreateWindowExA(