From fa37f170296284bb737dabb1c6c6fbf66db31c0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 16 Mar 2022 15:48:53 +0100 Subject: [PATCH] Windows: Properly set `mouse_monitor` instead of shadowing it GCC was raising a warning about unused variable, but it's actually meant to be used in the destructor for deinit. --- platform/windows/display_server_windows.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index e1ab2d1c83d..d09ca520992 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -3596,12 +3596,11 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win return; } - //gl_manager->set_use_vsync(current_videomode.use_vsync); RasterizerGLES3::make_current(); } #endif - HHOOK mouse_monitor = SetWindowsHookEx(WH_MOUSE, ::MouseProc, nullptr, GetCurrentThreadId()); + mouse_monitor = SetWindowsHookEx(WH_MOUSE, ::MouseProc, nullptr, GetCurrentThreadId()); Point2i window_position( (screen_get_size(0).width - p_resolution.width) / 2,