diff options
author | toger5 <toger5@hotmail.de> | 2017-02-22 00:45:31 +0200 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-05-07 14:23:56 +0200 |
commit | 304a1f5b5a3ce6975952f5cd22d688a246367790 (patch) | |
tree | 14de7920daa3f90af91c668b3edcccdf439ed6f2 /platform/windows | |
parent | c8aea60324e3e219945a805f871363c10292f38b (diff) |
Implemented scrolling factor for smooth trackpad scrolling
Working platforms platform: OSX, Windows.
Support for almost all ui elements, including project list.
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/os_windows.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 99b6890913..9dee2da21e 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -509,10 +509,13 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) if (!motion) return 0; - if (motion < 0) + if (motion < 0) { mb.button_index = BUTTON_WHEEL_LEFT; - else + mb.factor = fabs((double)motion / (double)WHEEL_DELTA); + } else { mb.button_index = BUTTON_WHEEL_RIGHT; + mb.factor = fabs((double)motion / (double)WHEEL_DELTA); + } } break; /* case WM_XBUTTONDOWN: { |