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

only center window if the new resolution is bigger than the current size of the window

This commit is contained in:
FunkyFr3sh 2020-10-03 21:22:38 +02:00
parent 2e65cc31aa
commit 3f93982306

View File

@ -715,7 +715,9 @@ HRESULT __stdcall ddraw_SetDisplayMode(IDirectDrawImpl *This, DWORD width, DWORD
}
//temporary fix: center window for games that keep changing their resolution
if (This->width && This->bpp == bpp && (This->width != width || This->height != height))
if (This->width &&
(This->width != width || This->height != height) &&
(width > WindowRect.right || height > WindowRect.bottom))
{
WindowRect.left = -32000;
WindowRect.top = -32000;