summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-08-06 15:55:08 +0200
committerGitHub <noreply@github.com>2021-08-06 15:55:08 +0200
commit2fedd10dd02a973bbd8a701fff3a659d649fbdb3 (patch)
treee81ecc17ee0e2a056dcb3567cd4f6b2b70709660
parentb3c2281706778cf5311a68fe0071aa2740d01131 (diff)
parent63ba15a51837e317bc4b150d69e8928cff13b9e0 (diff)
Merge pull request #51314 from georgwacker/fix-vertical-precision-scroll
Fix vertical scroll/zoom for precision touchpad on windows
-rw-r--r--platform/windows/display_server_windows.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp
index e78b23c509..4be95487b8 100644
--- a/platform/windows/display_server_windows.cpp
+++ b/platform/windows/display_server_windows.cpp
@@ -2445,7 +2445,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
} else {
mb->set_button_index(MOUSE_BUTTON_WHEEL_DOWN);
}
-
+ mb->set_factor(fabs((double)motion / (double)WHEEL_DELTA));
} break;
case WM_MOUSEHWHEEL: {
mb->set_pressed(true);
@@ -2456,11 +2456,10 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
if (motion < 0) {
mb->set_button_index(MOUSE_BUTTON_WHEEL_LEFT);
- mb->set_factor(fabs((double)motion / (double)WHEEL_DELTA));
} else {
mb->set_button_index(MOUSE_BUTTON_WHEEL_RIGHT);
- mb->set_factor(fabs((double)motion / (double)WHEEL_DELTA));
}
+ mb->set_factor(fabs((double)motion / (double)WHEEL_DELTA));
} break;
case WM_XBUTTONDOWN: {
mb->set_pressed(true);