Fix smooth touchpad scrolling on Windows

Forgot that I had half-implemented it but not finished it up..
This commit is contained in:
Henrik Rydgård 2023-01-01 22:23:14 +01:00
parent 9f85323b8a
commit 30c591e813

View file

@ -866,6 +866,11 @@ bool ScrollView::Key(const KeyInput &input) {
}
if (input.flags & KEY_DOWN) {
if ((input.keyCode == NKCODE_EXT_MOUSEWHEEL_UP || input.keyCode == NKCODE_EXT_MOUSEWHEEL_DOWN) &&
(input.flags & KEY_HASWHEELDELTA)) {
scrollSpeed = (float)(short)(input.flags >> 16) * 1.25f; // Fudge factor
}
switch (input.keyCode) {
case NKCODE_EXT_MOUSEWHEEL_UP:
ScrollRelative(-scrollSpeed);