From 3f939823069bcb07c93f7511bdd0f5c78428acbf Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Sat, 3 Oct 2020 21:22:38 +0200 Subject: [PATCH] only center window if the new resolution is bigger than the current size of the window --- src/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 12e70a2..116c8d5 100644 --- a/src/main.c +++ b/src/main.c @@ -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;