Skip to content

Commit

Permalink
enable windowed hack for non-popup windows
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Nov 3, 2024
1 parent 4db1628 commit e3af573
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,9 @@ HRESULT dd_SetCooperativeLevel(HWND hwnd, DWORD dwFlags)
RECT rc = { 0 };
real_GetClientRect(hwnd, &rc);

if (rc.right < real_GetSystemMetrics(SM_CXSCREEN) && rc.bottom < real_GetSystemMetrics(SM_CYSCREEN))
BOOL popup = real_GetWindowLongA(hwnd, GWL_STYLE) & WS_POPUP;

if ((rc.right < real_GetSystemMetrics(SM_CXSCREEN) && rc.bottom < real_GetSystemMetrics(SM_CYSCREEN)) || !popup)
{
g_ddraw.windowed_hack = TRUE;
dd_SetDisplayMode(rc.right, rc.bottom, 16, 0);
Expand Down

0 comments on commit e3af573

Please sign in to comment.