From 3ca1c554c495c79fec08c74b97858ff0994f34fa Mon Sep 17 00:00:00 2001 From: toaster Date: Sat, 4 Feb 2023 10:44:47 +0000 Subject: [PATCH] M_HandleMenuInput: Pass a choice of 2 to IT_CVAR/IT_ARROWS routines - Permits IT_ARROWS routines to distinguish between a rightward input and an A-button input. - Only M_ChangeCvar needed to change to accomodate this - every other example of IT_ARROWS already acommodates this --- src/k_menufunc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/k_menufunc.c b/src/k_menufunc.c index 7fd1adc61..6e9116cf2 100644 --- a/src/k_menufunc.c +++ b/src/k_menufunc.c @@ -143,7 +143,7 @@ static void M_ChangeCvar(INT32 choice) return; } - choice = (choice<<1) - 1; + choice = (choice == 0 ? -1 : 1); if (((currentMenu->menuitems[itemOn].status & IT_CVARTYPE) == IT_CV_SLIDER) || ((currentMenu->menuitems[itemOn].status & IT_CVARTYPE) == IT_CV_INVISSLIDER) @@ -939,7 +939,7 @@ static void M_HandleMenuInput(void) { case IT_CVAR: case IT_ARROWS: - routine(1); // right arrow + routine(2); // usually right arrow break; case IT_CALL: routine(itemOn);