Skip to content

Commit 4db1628

Browse files
committed
only use windowed hack if window is smaller than screen size
1 parent 2c69e41 commit 4db1628

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/dd.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,12 +1540,14 @@ HRESULT dd_SetCooperativeLevel(HWND hwnd, DWORD dwFlags)
15401540
}
15411541
else if (!g_ddraw.width)
15421542
{
1543-
g_ddraw.windowed_hack = TRUE;
1544-
15451543
RECT rc = { 0 };
15461544
real_GetClientRect(hwnd, &rc);
15471545

1548-
dd_SetDisplayMode(rc.right, rc.bottom, 16, 0);
1546+
if (rc.right < real_GetSystemMetrics(SM_CXSCREEN) && rc.bottom < real_GetSystemMetrics(SM_CYSCREEN))
1547+
{
1548+
g_ddraw.windowed_hack = TRUE;
1549+
dd_SetDisplayMode(rc.right, rc.bottom, 16, 0);
1550+
}
15491551
}
15501552
}
15511553
else

0 commit comments

Comments
 (0)