From a9752198c35ddd71440ff419c7428765fb439ea9 Mon Sep 17 00:00:00 2001 From: Matthew Coppola Date: Thu, 5 Dec 2024 00:47:15 -0500 Subject: [PATCH] Make mousescroll work effectively for fast sliders --- src/game/menuitem.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/game/menuitem.c b/src/game/menuitem.c index e08f569ff..ccd497189 100644 --- a/src/game/menuitem.c +++ b/src/game/menuitem.c @@ -2610,7 +2610,12 @@ bool menuitemSliderTick(struct menuitem *item, struct menudialog *dialog, struct #ifndef PLATFORM_N64 if (g_MenuUsingMouse && inputs->mousescroll) { - index += -inputs->mousescroll; + if ((item->flags & MENUITEMFLAG_SLIDER_FAST) == 0) { + index += -inputs->mousescroll; + } else { + s32 mult = item->param3 / 40; + index += -inputs->mousescroll * (mult ? mult : 1); + } } #endif