summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authornanahi <130121847+na-na-hi@users.noreply.github.com>2023-11-18 14:05:43 -0500
committerDudemanguy <random342@airmail.cc>2023-11-18 21:02:17 +0000
commit6fce181a25b69d4c418693988b4dc1ab5476e068 (patch)
tree6f3612ffcc143bd5a40c397b1a2e7a27d713270c /video
parentfeae35e15d45d553fbc091cfcdcb56fa45403748 (diff)
downloadmpv-6fce181a25b69d4c418693988b4dc1ab5476e068.tar.bz2
mpv-6fce181a25b69d4c418693988b4dc1ab5476e068.tar.xz
vo_sdl: fix broken mouse wheel multiplier
It only registers 1 mouse wheel event per 10 physical mouse wheel clicks.
Diffstat (limited to 'video')
-rw-r--r--video/out/vo_sdl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/video/out/vo_sdl.c b/video/out/vo_sdl.c
index b6069c7ecc..5f4c027ed5 100644
--- a/video/out/vo_sdl.c
+++ b/video/out/vo_sdl.c
@@ -623,9 +623,9 @@ static void wait_events(struct vo *vo, int64_t until_time_ns)
}
case SDL_MOUSEWHEEL: {
#if SDL_VERSION_ATLEAST(2, 0, 4)
- double multiplier = ev.wheel.direction == SDL_MOUSEWHEEL_FLIPPED ? -0.1 : 0.1;
+ double multiplier = ev.wheel.direction == SDL_MOUSEWHEEL_FLIPPED ? -1 : 1;
#else
- double multiplier = 0.1;
+ double multiplier = 1;
#endif
int y_code = ev.wheel.y > 0 ? MP_WHEEL_UP : MP_WHEEL_DOWN;
mp_input_put_wheel(vo->input_ctx, y_code, abs(ev.wheel.y) * multiplier);