From a880044f195680920f865704461cae7002f03317 Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 18 Feb 2023 13:34:02 -0800 Subject: [PATCH] Move options menu profile reset to before profile gets set When exiting a card, once the transition ends, there was a 1 tic window that an A press could select a card and THEN set the profile pointer to NULL. --- src/menus/options-profiles-1.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/menus/options-profiles-1.c b/src/menus/options-profiles-1.c index c4ca13561..18a0316bc 100644 --- a/src/menus/options-profiles-1.c +++ b/src/menus/options-profiles-1.c @@ -123,6 +123,12 @@ void M_HandleProfileSelect(INT32 ch) boolean creatable = (maxp < MAXPROFILES); (void) ch; + if (menutransition.tics == 0 && optionsmenu.resetprofile) + { + optionsmenu.profile = NULL; // Make sure to reset that when transitions are done.' + optionsmenu.resetprofile = false; + } + if (!creatable) { maxp = MAXPROFILES; @@ -215,10 +221,4 @@ void M_HandleProfileSelect(INT32 ch) M_GoBack(0); M_SetMenuDelay(pid); } - - if (menutransition.tics == 0 && optionsmenu.resetprofile) - { - optionsmenu.profile = NULL; // Make sure to reset that when transitions are done.' - optionsmenu.resetprofile = false; - } }