Fix MouseWheel position on Windows
This commit is contained in:
parent
f8bd488457
commit
dd2b7ef747
1 changed files with 2 additions and 2 deletions
|
@ -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_position(Vector2(old_x, old_y));
|
||||||
}
|
}
|
||||||
|
|
||||||
mb->set_global_position(mb->get_position());
|
|
||||||
|
|
||||||
if (uMsg != WM_MOUSEWHEEL) {
|
if (uMsg != WM_MOUSEWHEEL) {
|
||||||
if (mb->is_pressed()) {
|
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_position(Vector2(coords.x, coords.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mb->set_global_position(mb->get_position());
|
||||||
|
|
||||||
if (main_loop) {
|
if (main_loop) {
|
||||||
input->parse_input_event(mb);
|
input->parse_input_event(mb);
|
||||||
if (mb->is_pressed() && mb->get_button_index() > 3) {
|
if (mb->is_pressed() && mb->get_button_index() > 3) {
|
||||||
|
|
Loading…
Reference in a new issue