diff --git a/inc/config.h b/inc/config.h index 168c54db61..fef71bb414 100644 --- a/inc/config.h +++ b/inc/config.h @@ -65,7 +65,6 @@ typedef struct CNCDDRAWCONFIG BOOL fix_alt_key_stuck; BOOL fix_not_responding; BOOL no_compat_warning; - BOOL wine_allow_resize; int guard_lines; int max_resolutions; BOOL lock_surfaces; diff --git a/src/config.c b/src/config.c index 6b25434698..9472523fc7 100644 --- a/src/config.c +++ b/src/config.c @@ -78,7 +78,6 @@ void cfg_load() GET_BOOL(GameHandlesClose, "game_handles_close", FALSE); GET_BOOL(g_config.fix_not_responding, "fix_not_responding", FALSE); GET_BOOL(g_config.no_compat_warning, "no_compat_warning", FALSE); - GET_BOOL(g_config.wine_allow_resize, "wine_allow_resize", FALSE); GET_INT(g_config.guard_lines, "guard_lines", 200); GET_INT(g_config.max_resolutions, "max_resolutions", 0); GET_BOOL(g_config.lock_surfaces, "lock_surfaces", FALSE); @@ -314,7 +313,6 @@ static void cfg_create_ini() "game_handles_close=false\n" "fix_not_responding=false\n" "no_compat_warning=false\n" - "wine_allow_resize=false\n" "guard_lines=200\n" "max_resolutions=0\n" "lock_surfaces=false\n" diff --git a/src/dd.c b/src/dd.c index b6c3382eb8..94b7adfb2e 100644 --- a/src/dd.c +++ b/src/dd.c @@ -1093,12 +1093,12 @@ 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.wine_allow_resize && IsWine()) + if (IsLinux()) { real_SetWindowLongA( g_ddraw.hwnd, GWL_STYLE, - (real_GetWindowLongA(g_ddraw.hwnd, GWL_STYLE) | WS_MINIMIZEBOX) & ~(WS_MAXIMIZEBOX | WS_THICKFRAME)); + (real_GetWindowLongA(g_ddraw.hwnd, GWL_STYLE) | WS_MINIMIZEBOX) & ~(WS_MAXIMIZEBOX)); } /* center the window with correct dimensions */ diff --git a/src/wndproc.c b/src/wndproc.c index eecba37d03..a76e1263b3 100644 --- a/src/wndproc.c +++ b/src/wndproc.c @@ -443,12 +443,23 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam { if (wParam == SIZE_RESTORED) { + if (in_size_move && g_ddraw.render.thread && IsMacOS()) + { + EnterCriticalSection(&g_ddraw.cs); + g_ddraw.render.run = FALSE; + ReleaseSemaphore(g_ddraw.render.sem, 1, NULL); + LeaveCriticalSection(&g_ddraw.cs); + + WaitForSingleObject(g_ddraw.render.thread, INFINITE); + g_ddraw.render.thread = NULL; + } + if (in_size_move && !g_ddraw.render.thread) { g_config.window_rect.right = LOWORD(lParam); g_config.window_rect.bottom = HIWORD(lParam); } - else if (!in_size_move && g_ddraw.render.thread && !g_config.fullscreen && g_config.wine_allow_resize && IsLinux()) + else if (!in_size_move && g_ddraw.render.thread && !g_config.fullscreen && IsLinux()) { g_config.window_rect.right = LOWORD(lParam); g_config.window_rect.bottom = HIWORD(lParam);