From b9316be98f0cd092a7c83531c0ae2645437e76cb Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Thu, 7 Jul 2022 15:52:03 +0600 Subject: [PATCH] Replace rest of the instances with doresize_monitors[0] --- src/win/win_specify_dim.c | 2 +- src/win/win_ui.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/win/win_specify_dim.c b/src/win/win_specify_dim.c index 74ac5ef59..f2d8a768d 100644 --- a/src/win/win_specify_dim.c +++ b/src/win/win_specify_dim.c @@ -134,7 +134,7 @@ SpecifyDimensionsDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM scrnsz_x = fixed_size_x; scrnsz_y = fixed_size_y; - atomic_flag_clear(&doresize); + atomic_store(&doresize_monitors[0], 1); GetWindowRect(hwndMain, &r); diff --git a/src/win/win_ui.c b/src/win/win_ui.c index 1a9ad961a..b02664243 100644 --- a/src/win/win_ui.c +++ b/src/win/win_ui.c @@ -646,7 +646,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) scrnsz_x = unscaled_size_x; scrnsz_y = unscaled_size_y; - atomic_flag_clear(&doresize); + atomic_store(&doresize_monitors[0], 0); config_save(); break; @@ -745,7 +745,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) reset_screen_size(); device_force_redraw(); video_force_resize_set(1); - atomic_flag_clear(&doresize); + atomic_store(&doresize_monitors[0], 0); config_save(); break; @@ -760,7 +760,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) case IDM_VID_HIDPI: dpi_scale = !dpi_scale; CheckMenuItem(hmenu, IDM_VID_HIDPI, dpi_scale ? MF_CHECKED : MF_UNCHECKED); - atomic_flag_clear(&doresize); + atomic_store(&doresize_monitors[0], 0); config_save(); break; @@ -860,7 +860,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) /* Main Window. */ ResizeWindowByClientArea(hwndMain, temp_x, temp_y + (hide_status_bar ? 0 : sbar_height) + (hide_tool_bar ? 0 : tbar_height)); } else if (!user_resize) - atomic_flag_clear(&doresize); + atomic_store(&doresize_monitors[0], 0); break; case WM_WINDOWPOSCHANGED: @@ -909,13 +909,13 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) if (temp_x != scrnsz_x || temp_y != scrnsz_y) { scrnsz_x = temp_x; scrnsz_y = temp_y; - atomic_flag_clear(&doresize); + atomic_store(&doresize_monitors[0], 0); } } else { if (rect.right != scrnsz_x || rect.bottom != scrnsz_y) { scrnsz_x = rect.right; scrnsz_y = rect.bottom; - atomic_flag_clear(&doresize); + atomic_store(&doresize_monitors[0], 0); } } @@ -1092,7 +1092,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) /* If window is not resizable, then tell the main thread to resize it, as sometimes, moves can mess up the window size. */ if (!vid_resize) - atomic_flag_clear(&doresize); + atomic_store(&doresize_monitors[0], 0); break; }