From 9dd12683067bb800bb8951c0e91e65757aa8d3f8 Mon Sep 17 00:00:00 2001 From: ACB Date: Mon, 11 Dec 2023 12:27:28 +0100 Subject: [PATCH] remove dead code from DisplayServerWindows::window_set_size --- platform/windows/display_server_windows.cpp | 26 +++++++-------------- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 03584977feb..754b7de10fe 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -1832,24 +1832,6 @@ void DisplayServerWindows::window_set_size(const Size2i p_size, WindowID p_windo int w = p_size.width; int h = p_size.height; - - wd.width = w; - wd.height = h; - -#if defined(RD_ENABLED) - if (rendering_context) { - rendering_context->window_set_size(p_window, w, h); - } -#endif -#if defined(GLES3_ENABLED) - if (gl_manager_native) { - gl_manager_native->window_resize(p_window, w, h); - } - if (gl_manager_angle) { - gl_manager_angle->window_resize(p_window, w, h); - } -#endif - RECT rect; GetWindowRect(wd.hWnd, &rect); @@ -4640,6 +4622,14 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA // Note: Trigger resize event to update swapchains when window is minimized/restored, even if size is not changed. rendering_context->window_set_size(window_id, window.width, window.height); } +#endif +#if defined(GLES3_ENABLED) + if (gl_manager_native) { + gl_manager_native->window_resize(window_id, window.width, window.height); + } + if (gl_manager_angle) { + gl_manager_angle->window_resize(window_id, window.width, window.height); + } #endif }