From 57678ce9f828aa1c1e4af9046221ef16e21300ff Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Wed, 21 Sep 2022 21:13:08 +0200 Subject: [PATCH] use AdjustWindowRectEx --- src/dd.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/dd.c b/src/dd.c index b6d8d40..71b5a3c 100644 --- a/src/dd.c +++ b/src/dd.c @@ -705,9 +705,17 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl RECT dst = { x, y, g_ddraw->render.width + x, g_ddraw->render.height + y }; - AdjustWindowRect(&dst, GetWindowLong(g_ddraw->hwnd, GWL_STYLE), GetMenu(g_ddraw->hwnd) != NULL); - real_SetWindowPos(g_ddraw->hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED); - real_MoveWindow(g_ddraw->hwnd, dst.left, dst.top, (dst.right - dst.left), (dst.bottom - dst.top), TRUE); + LONG style = GetWindowLong(g_ddraw->hwnd, GWL_STYLE); + LONG exstyle = GetWindowLong(g_ddraw->hwnd, GWL_EXSTYLE); + + AdjustWindowRectEx(&dst, style, GetMenu(g_ddraw->hwnd) != NULL, exstyle); + + real_SetWindowPos( + g_ddraw->hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED); + + real_MoveWindow( + g_ddraw->hwnd, dst.left, dst.top, (dst.right - dst.left), (dst.bottom - dst.top), TRUE); + BOOL d3d9_active = FALSE;