Skip to content

Commit

Permalink
#304 - Limit window size to max surface size (Dune2000 1.02)
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Apr 16, 2024
1 parent 9d4f3b1 commit 6dc8390
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/winapi_hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1357,6 +1357,13 @@ HWND WINAPI fake_CreateWindowExA(
dwStyle |= WS_CLIPCHILDREN;
}

/* 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);
}

return real_CreateWindowExA(
dwExStyle,
lpClassName,
Expand Down

0 comments on commit 6dc8390

Please sign in to comment.