1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-14 22:03:27 +01:00

enable windowed hack for non-popup windows

This commit is contained in:
FunkyFr3sh 2024-11-03 05:07:09 +01:00
parent 4db1628431
commit e3af573916

View File

@ -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);