Skip to content

Commit

Permalink
remove dead code from DisplayServerWindows::window_set_size
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0ACB committed May 28, 2024
1 parent be56cab commit 9dd1268
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions platform/windows/display_server_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 9dd1268

Please sign in to comment.