Преглед изворни кода

Merge pull request #9198 from vnen/fix-wheel-pos

Fix MouseWheel position on Windows
Rémi Verschelde пре 8 година
родитељ
комит
0a339f14a8
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      platform/windows/os_windows.cpp

+ 2 - 2
platform/windows/os_windows.cpp

@@ -543,8 +543,6 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 					mb->set_position(Vector2(old_x, old_y));
 				}
 
-				mb->set_global_position(mb->get_position());
-
 				if (uMsg != WM_MOUSEWHEEL) {
 					if (mb->is_pressed()) {
 
@@ -568,6 +566,8 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 					mb->set_position(Vector2(coords.x, coords.y));
 				}
 
+				mb->set_global_position(mb->get_position());
+
 				if (main_loop) {
 					input->parse_input_event(mb);
 					if (mb->is_pressed() && mb->get_button_index() > 3) {