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

only use windowed hack if window is smaller than screen size

This commit is contained in:
FunkyFr3sh 2024-11-03 02:32:00 +01:00
parent 2c69e41b18
commit 4db1628431

View File

@ -1540,12 +1540,14 @@ HRESULT dd_SetCooperativeLevel(HWND hwnd, DWORD dwFlags)
}
else if (!g_ddraw.width)
{
g_ddraw.windowed_hack = TRUE;
RECT rc = { 0 };
real_GetClientRect(hwnd, &rc);
dd_SetDisplayMode(rc.right, rc.bottom, 16, 0);
if (rc.right < real_GetSystemMetrics(SM_CXSCREEN) && rc.bottom < real_GetSystemMetrics(SM_CYSCREEN))
{
g_ddraw.windowed_hack = TRUE;
dd_SetDisplayMode(rc.right, rc.bottom, 16, 0);
}
}
}
else