From 05e0cd74671ebc462344e361b779538d49dc71c8 Mon Sep 17 00:00:00 2001 From: avolkov Date: Fri, 5 May 2006 23:15:07 +0000 Subject: [PATCH] Fixes Quit (F10) during the intro to exit to main menu; bug #862 git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2354 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/restart.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/sc2/src/sc2code/restart.c b/sc2/src/sc2code/restart.c index 64b1a0b70..bd1726313 100644 --- a/sc2/src/sc2code/restart.c +++ b/sc2/src/sc2code/restart.c @@ -379,23 +379,27 @@ TryStartGame (void) BOOLEAN StartGame (void) { - while (!TryStartGame ()) + do { - if (GLOBAL (CurrentActivity) == (ACTIVITY)~0) - { // timed out - GLOBAL (CurrentActivity) = 0; - SplashScreen (0); - Credits (FALSE); + while (!TryStartGame ()) + { + if (GLOBAL (CurrentActivity) == (ACTIVITY)~0) + { // timed out + GLOBAL (CurrentActivity) = 0; + SplashScreen (0); + Credits (FALSE); + } + + if (GLOBAL (CurrentActivity) & CHECK_ABORT) + return (FALSE); // quit } - if (GLOBAL (CurrentActivity) & CHECK_ABORT) - return (FALSE); // quit - } - - if (LastActivity & CHECK_RESTART) - { // starting a new game - Introduction (); - } + if (LastActivity & CHECK_RESTART) + { // starting a new game + Introduction (); + } + + } while (GLOBAL (CurrentActivity) & CHECK_ABORT); { extern STAR_DESC starmap_array[];