From fc9bb11e755b8e0436b138c250f6ae695b0c4945 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Sun, 6 Oct 2024 21:38:07 +0200 Subject: [PATCH] fix resizable .ini setting in wine --- src/dd.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/dd.c b/src/dd.c index 30fa884706..053e030abb 100644 --- a/src/dd.c +++ b/src/dd.c @@ -1093,6 +1093,14 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl real_SetWindowLongA(g_ddraw.hwnd, GWL_EXSTYLE, exstyle & ~(WS_EX_CLIENTEDGE)); } + if (!g_config.resizable && IsWine()) + { + real_SetWindowLongA( + g_ddraw.hwnd, + GWL_STYLE, + (real_GetWindowLongA(g_ddraw.hwnd, GWL_STYLE) | WS_MINIMIZEBOX) & ~(WS_MAXIMIZEBOX | WS_THICKFRAME)); + } + /* center the window with correct dimensions */ int cy = g_ddraw.mode.dmPelsWidth ? g_ddraw.mode.dmPelsWidth : g_ddraw.render.width; int cx = g_ddraw.mode.dmPelsHeight ? g_ddraw.mode.dmPelsHeight : g_ddraw.render.height;