From f394d7f7cef8b5da2ffb3962613264178af62058 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Tue, 13 Aug 2019 10:21:13 +0200 Subject: [PATCH] always center to screen in games that use multiple resolutions --- src/main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.c b/src/main.c index 18152b3..a594974 100644 --- a/src/main.c +++ b/src/main.c @@ -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;