From 82224177456beb7fc71a4632662c982943460afd Mon Sep 17 00:00:00 2001 From: avolkov Date: Tue, 7 Jul 2009 00:51:26 +0000 Subject: [PATCH] Do not pause the game in places where not relevant; bug #984 git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3173 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 1 + sc2/src/sc2code/cnctdlg.c | 3 +++ sc2/src/sc2code/loadmele.c | 3 +++ sc2/src/sc2code/melee.c | 17 ++++++++++++++++- sc2/src/sc2code/setupmenu.c | 3 +++ 5 files changed, 26 insertions(+), 1 deletion(-) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 143ccf96c..4a432db38 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Do not pause the game in places where not relevant (bug #984) - Alex - Fixed crashes and potential weirdness when loading savegames from a Homeworld encounter screen (bug #997) - Alex - Cleanup of GLOBAL(ShipStamp.frame) abuse; fixes bug #1054 - Alex diff --git a/sc2/src/sc2code/cnctdlg.c b/sc2/src/sc2code/cnctdlg.c index 2eff63403..10b97bc0f 100644 --- a/sc2/src/sc2code/cnctdlg.c +++ b/sc2/src/sc2code/cnctdlg.c @@ -548,6 +548,9 @@ DoMeleeConnectDialog (CONNECT_DIALOG_STATE *state) { BOOLEAN changed; + /* Cancel any presses of the Pause key. */ + GamePaused = FALSE; + if (!state->Initialized) { state->Initialized = TRUE; diff --git a/sc2/src/sc2code/loadmele.c b/sc2/src/sc2code/loadmele.c index 5b4cef519..0b45460aa 100644 --- a/sc2/src/sc2code/loadmele.c +++ b/sc2/src/sc2code/loadmele.c @@ -330,6 +330,9 @@ DoLoadTeam (MELEE_STATE *pMS) { DWORD TimeIn = GetTimeCounter (); + /* Cancel any presses of the Pause key. */ + GamePaused = FALSE; + if (GLOBAL (CurrentActivity) & CHECK_ABORT) return FALSE; diff --git a/sc2/src/sc2code/melee.c b/sc2/src/sc2code/melee.c index 57ae43c72..2c08aef31 100644 --- a/sc2/src/sc2code/melee.c +++ b/sc2/src/sc2code/melee.c @@ -1051,6 +1051,9 @@ DoEdit (MELEE_STATE *pMS) { DWORD TimeIn = GetTimeCounter (); + /* Cancel any presses of the Pause key. */ + GamePaused = FALSE; + if (GLOBAL (CurrentActivity) & CHECK_ABORT) return (FALSE); @@ -1221,6 +1224,9 @@ DoPickShip (MELEE_STATE *pMS) { DWORD TimeIn = GetTimeCounter (); + /* Cancel any presses of the Pause key. */ + GamePaused = FALSE; + if (GLOBAL (CurrentActivity) & CHECK_ABORT) return (FALSE); @@ -1398,6 +1404,9 @@ DoConfirmSettings (MELEE_STATE *pMS) ssize_t numDone; #endif + /* Cancel any presses of the Pause key. */ + GamePaused = FALSE; + if (PulsedInputState.menu[KEY_MENU_CANCEL]) { pMS->InputFunc = DoMelee; @@ -1853,6 +1862,9 @@ DoConnectingDialog (MELEE_STATE *pMS) COUNT which_side = (pMS->MeleeOption == NET_TOP) ? 1 : 0; NetConnection *conn; + /* Cancel any presses of the Pause key. */ + GamePaused = FALSE; + if (GLOBAL (CurrentActivity) & CHECK_ABORT) return (FALSE); @@ -2036,8 +2048,11 @@ BOOLEAN DoMelee (MELEE_STATE *pMS) { DWORD TimeIn = GetTimeCounter (); - BOOLEAN force_select = FALSE; + + /* Cancel any presses of the Pause key. */ + GamePaused = FALSE; + if (GLOBAL (CurrentActivity) & CHECK_ABORT) return (FALSE); diff --git a/sc2/src/sc2code/setupmenu.c b/sc2/src/sc2code/setupmenu.c index a27130d60..a818d2b0b 100644 --- a/sc2/src/sc2code/setupmenu.c +++ b/sc2/src/sc2code/setupmenu.c @@ -426,6 +426,9 @@ PropagateResults (void) static BOOLEAN DoSetupMenu (SETUP_MENU_STATE *pInputState) { + /* Cancel any presses of the Pause key. */ + GamePaused = FALSE; + if (!pInputState->initialized) { SetDefaultMenuRepeatDelay ();