summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/input/input_sdl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/input/input_sdl.cpp')
-rw-r--r--src/osd/modules/input/input_sdl.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/osd/modules/input/input_sdl.cpp b/src/osd/modules/input/input_sdl.cpp
index cc7cb2f1451..62e13cbf960 100644
--- a/src/osd/modules/input/input_sdl.cpp
+++ b/src/osd/modules/input/input_sdl.cpp
@@ -736,12 +736,13 @@ public:
break;
case SDL_MOUSEWHEEL:
+ // adjust SDL 1-per-click to match Win32 120-per-click
#if SDL_VERSION_ATLEAST(2, 0, 18)
- m_v += event.wheel.preciseY * input_device::RELATIVE_PER_PIXEL;
- m_h += event.wheel.preciseX * input_device::RELATIVE_PER_PIXEL;
+ m_v += std::lround(event.wheel.preciseY * 120 * input_device::RELATIVE_PER_PIXEL);
+ m_h += std::lround(event.wheel.preciseX * 120 * input_device::RELATIVE_PER_PIXEL);
#else
- m_v += event.wheel.y * input_device::RELATIVE_PER_PIXEL;
- m_h += event.wheel.x * input_device::RELATIVE_PER_PIXEL;
+ m_v += event.wheel.y * 120 * input_device::RELATIVE_PER_PIXEL;
+ m_h += event.wheel.x * 120 * input_device::RELATIVE_PER_PIXEL;
#endif
break;
}