Fix vertical scroll/zoom for precision touchpad
Adds factor data for vertical mousewheel event, in line with horizontal mousewheel event
(cherry picked from commit 63ba15a518
)
This commit is contained in:
parent
5b3f6a6d34
commit
eaf45d4f60
|
@ -917,11 +917,12 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
if (!motion)
|
||||
return 0;
|
||||
|
||||
if (motion > 0)
|
||||
if (motion > 0) {
|
||||
mb->set_button_index(BUTTON_WHEEL_UP);
|
||||
else
|
||||
} else {
|
||||
mb->set_button_index(BUTTON_WHEEL_DOWN);
|
||||
|
||||
}
|
||||
mb->set_factor(fabs((double)motion / (double)WHEEL_DELTA));
|
||||
} break;
|
||||
case WM_MOUSEHWHEEL: {
|
||||
|
||||
|
@ -932,11 +933,10 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
if (motion < 0) {
|
||||
mb->set_button_index(BUTTON_WHEEL_LEFT);
|
||||
mb->set_factor(fabs((double)motion / (double)WHEEL_DELTA));
|
||||
} else {
|
||||
mb->set_button_index(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: {
|
||||
|
||||
|
|
Loading…
Reference in New Issue