mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-25 01:57:47 +01:00
enable windowed hack for non-popup windows
This commit is contained in:
parent
4db1628431
commit
e3af573916
4
src/dd.c
4
src/dd.c
@ -1543,7 +1543,9 @@ HRESULT dd_SetCooperativeLevel(HWND hwnd, DWORD dwFlags)
|
|||||||
RECT rc = { 0 };
|
RECT rc = { 0 };
|
||||||
real_GetClientRect(hwnd, &rc);
|
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;
|
g_ddraw.windowed_hack = TRUE;
|
||||||
dd_SetDisplayMode(rc.right, rc.bottom, 16, 0);
|
dd_SetDisplayMode(rc.right, rc.bottom, 16, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user