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

always center to screen in games that use multiple resolutions

This commit is contained in:
FunkyFr3sh 2019-08-13 10:21:13 +02:00
parent 3bd57f9ad1
commit f394d7f7ce

View File

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