mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-25 01:57:47 +01:00
only use windowed hack if window is smaller than screen size
This commit is contained in:
parent
2c69e41b18
commit
4db1628431
8
src/dd.c
8
src/dd.c
@ -1540,12 +1540,14 @@ HRESULT dd_SetCooperativeLevel(HWND hwnd, DWORD dwFlags)
|
|||||||
}
|
}
|
||||||
else if (!g_ddraw.width)
|
else if (!g_ddraw.width)
|
||||||
{
|
{
|
||||||
g_ddraw.windowed_hack = TRUE;
|
|
||||||
|
|
||||||
RECT rc = { 0 };
|
RECT rc = { 0 };
|
||||||
real_GetClientRect(hwnd, &rc);
|
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
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user