More consistent lastOn --> itemOn and BGImage setting

Fixes Mari's background image bug
This commit is contained in:
toaster 2024-01-27 00:02:16 +00:00
parent 02ee9b4766
commit 06c049bb7e
3 changed files with 7 additions and 5 deletions

View file

@ -2490,6 +2490,7 @@ static void Command_connect(void)
// Menu restore state. // Menu restore state.
restoreMenu = &PLAY_MP_OptSelectDef; restoreMenu = &PLAY_MP_OptSelectDef;
currentMenu->lastOn = itemOn;
Music_Remap("menu", "NETMD2"); Music_Remap("menu", "NETMD2");

View file

@ -667,8 +667,6 @@ void M_StartControlPanel(void)
} }
} }
M_PickMenuBGMap();
if (M_GameTrulyStarted() == false) if (M_GameTrulyStarted() == false)
{ {
// Are you ready for the First Boot Experience? // Are you ready for the First Boot Experience?
@ -713,14 +711,15 @@ void M_StartControlPanel(void)
M_PlayMenuJam(); M_PlayMenuJam();
} }
itemOn = currentMenu->lastOn;
M_UpdateMenuBGImage(true);
} }
else else
{ {
M_OpenPauseMenu(); M_OpenPauseMenu();
} }
itemOn = currentMenu->lastOn;
CON_ToggleOff(); // move away console CON_ToggleOff(); // move away console
} }
@ -741,6 +740,8 @@ void M_ClearMenus(boolean callexitmenufunc)
COM_BufAddText(va("saveconfig \"%s\" -silent\n", configfile)); COM_BufAddText(va("saveconfig \"%s\" -silent\n", configfile));
#endif //Alam: But not on the Dreamcast's VMUs #endif //Alam: But not on the Dreamcast's VMUs
currentMenu->lastOn = itemOn;
if (gamestate == GS_MENU) // Back to title screen if (gamestate == GS_MENU) // Back to title screen
{ {
int i; int i;

View file

@ -123,7 +123,7 @@ void M_OpenPauseMenu(void)
pausemenu.openoffset.dist = 0; pausemenu.openoffset.dist = 0;
pausemenu.closing = false; pausemenu.closing = false;
currentMenu->lastOn = mpause_continue; // Make sure we select "RESUME GAME" by default itemOn = currentMenu->lastOn = mpause_continue; // Make sure we select "RESUME GAME" by default
// Now the hilarious balancing act of deciding what options should be enabled and which ones shouldn't be! // Now the hilarious balancing act of deciding what options should be enabled and which ones shouldn't be!
// By default, disable anything sensitive: // By default, disable anything sensitive: