From 8920ec8e6ae3af003b8585e55c2b68d2fc08ccb2 Mon Sep 17 00:00:00 2001 From: SinnamonLat Date: Sat, 19 Feb 2022 21:45:42 +0100 Subject: [PATCH] Disable profile setup outside of GS_MENU --- src/k_menu.h | 2 +- src/k_menufunc.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/k_menu.h b/src/k_menu.h index 07f24df9b..b809a2c07 100644 --- a/src/k_menu.h +++ b/src/k_menu.h @@ -211,7 +211,7 @@ extern menu_t OPTIONS_MainDef; // We'll need this since we're gonna have to dynamically enable and disable options depending on which state we're in. typedef enum { - mopt_controls = 0, + mopt_profiles = 0, mopt_video, mopt_sound, mopt_hud, diff --git a/src/k_menufunc.c b/src/k_menufunc.c index 2ef29b9a3..3b276d707 100644 --- a/src/k_menufunc.c +++ b/src/k_menufunc.c @@ -3414,6 +3414,7 @@ void M_InitOptions(INT32 choice) { (void)choice; + OPTIONS_MainDef.menuitems[mopt_profiles].status = IT_STRING | IT_SUBMENU; OPTIONS_MainDef.menuitems[mopt_gameplay].status = IT_STRING | IT_SUBMENU; OPTIONS_MainDef.menuitems[mopt_server].status = IT_STRING | IT_SUBMENU; @@ -3424,6 +3425,10 @@ void M_InitOptions(INT32 choice) OPTIONS_MainDef.menuitems[mopt_server].status = IT_STRING | IT_TRANSTEXT; } + // disable profiles outside of gs_menu altogether. + if (gamestate != GS_MENU) + OPTIONS_MainDef.menuitems[mopt_profiles].status = IT_STRING | IT_TRANSTEXT; + optionsmenu.ticker = 0; optionsmenu.offset = 0; @@ -3961,10 +3966,10 @@ void M_MapProfileControl(event_t *ev) // Only consider keydown and joystick events to make sure we ignore ev_mouse and other events if (ev->type != ev_keydown && ev->type != ev_joystick) return; - + // Set menu delay regardless of what we're doing to avoid stupid stuff. M_SetMenuDelay(0); - + // Check if this control is already assigned, it'd look silly to assign the same key twice on the same thing. if (n == 0 && optionsmenu.profile->controls[controln][1] == c) {