only use windowed hack if window is smaller than screen size
This commit is contained in:
parent
2c69e41b18
commit
4db1628431
1 changed files with 5 additions and 3 deletions
8
src/dd.c
8
src/dd.c
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue