diff --git a/sc2/ChangeLog b/sc2/ChangeLog index be36dcfca..e46fb2abf 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Canceling load from the main menu returns to main menu (bug #679) - Alex - Fixed inputting numbers with the numpad, except directx (bug #934) - Alex - Better location description in savegame summaries (bug #844) - Alex - Fixed crash when saving a game into the last slot while having diff --git a/sc2/src/sc2code/gameopt.c b/sc2/src/sc2code/gameopt.c index b286707e0..6045273b7 100644 --- a/sc2/src/sc2code/gameopt.c +++ b/sc2/src/sc2code/gameopt.c @@ -898,7 +898,11 @@ Restart: pMS->ModuleFrame = 0; pMS->CurState = (BYTE)pMS->delta_item; ResumeMusic (); - if (pSolarSysState) + if (LastActivity == CHECK_LOAD) + { // Selected LOAD from main menu, and now canceled + GLOBAL (CurrentActivity) |= CHECK_ABORT; + } + else if (pSolarSysState) { #define DRAW_REFRESH (1 << 5) #define REPAIR_SCAN (1 << 6) @@ -1098,13 +1102,11 @@ ChangeGameSelection: } font_DrawText (&t); } - if (LastActivity == CHECK_LOAD) + if (LastActivity == CHECK_LOAD && first_time) { BYTE clut_buf[] = {FadeAllToColor}; UnbatchGraphics (); - - LastActivity = 0; XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND / 2); } else @@ -1236,7 +1238,7 @@ DoGameOptions (MENU_STATE *pMS) return (FALSE); if (LastActivity == CHECK_LOAD) - force_select = TRUE; + force_select = TRUE; // Selected LOAD from main menu SetMenuSounds (MENU_SOUND_ARROWS, MENU_SOUND_SELECT); diff --git a/sc2/src/sc2code/planets/pstarmap.c b/sc2/src/sc2code/planets/pstarmap.c index ece53a227..286dfde46 100644 --- a/sc2/src/sc2code/planets/pstarmap.c +++ b/sc2/src/sc2code/planets/pstarmap.c @@ -1717,7 +1717,7 @@ DoFlagshipCommands (MENU_STATE *pMS) NewState = pMS->CurState; if (LastActivity == CHECK_LOAD) - select = TRUE; + select = TRUE; // Selected LOAD from main menu if (select) { if (NewState != SCAN + 1 && NewState != (GAME_MENU) + 1) diff --git a/sc2/src/sc2code/planets/solarsys.c b/sc2/src/sc2code/planets/solarsys.c index b0bdf8fa9..c9b3d9e9d 100644 --- a/sc2/src/sc2code/planets/solarsys.c +++ b/sc2/src/sc2code/planets/solarsys.c @@ -1236,7 +1236,9 @@ IP_frame (void) LockMutex (GraphicsLock); DrawStatusMessage (NULL); if (LastActivity == CHECK_LOAD) + { // Selected LOAD from main menu pSolarSysState->MenuState.CurState = (ROSTER + 1) + 1; + } else { UnlockMutex (GraphicsLock);