From 08b4d780b729ad544cb7f48dac071fc419aa4e86 Mon Sep 17 00:00:00 2001 From: fgsfds Date: Sat, 18 May 2024 19:18:27 +0200 Subject: [PATCH] port: temporary fix for the UI back button --- src/game/menu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/game/menu.c b/src/game/menu.c index ffa389088..f45e97cc2 100644 --- a/src/game/menu.c +++ b/src/game/menu.c @@ -4746,8 +4746,9 @@ void menuProcessInput(void) inputs.select = 1; } - // don't back out on weapon back when using mouse because it's likely bound to wheel - if (!g_MenuMouseControl && (buttonsnow & BUTTON_WPNBACK)) { + // HACK: don't back out on weapon back when it's bound to wheel + const bool wheel = inputKeyPressed(VK_MOUSE_WHEEL_UP) || inputKeyPressed(VK_MOUSE_WHEEL_DN); + if ((buttonsnow & BUTTON_WPNBACK) && !wheel) { inputs.back = 1; } #endif @@ -4781,6 +4782,7 @@ void menuProcessInput(void) if ((sticky < 0 ? -sticky : sticky) < (thissticky < 0 ? -thissticky : thissticky)) { sticky = thissticky; } + #ifndef PLATFORM_N64 if ((sticky < 0 ? -sticky : sticky) < (thisrsticky < 0 ? -thisrsticky : thisrsticky)) { sticky = thisrsticky;