Cleanup to fix to #678, after discussion in #sc2dev
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1659 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
+13
-2
@@ -16,6 +16,7 @@
|
|||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
#include "gameev.h"
|
#include "gameev.h"
|
||||||
#include "globdata.h"
|
#include "globdata.h"
|
||||||
#include "setup.h"
|
#include "setup.h"
|
||||||
@@ -223,8 +224,13 @@ void
|
|||||||
SuspendGameClock (void)
|
SuspendGameClock (void)
|
||||||
{
|
{
|
||||||
if (!clock_mutex)
|
if (!clock_mutex)
|
||||||
|
{
|
||||||
|
fprintf (stderr, "BUG: Attempted to suspend non-existent game clock\n");
|
||||||
|
#ifdef DEBUG
|
||||||
|
abort();
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
LockMutex (clock_mutex);
|
LockMutex (clock_mutex);
|
||||||
if (GameClockRunning ())
|
if (GameClockRunning ())
|
||||||
{
|
{
|
||||||
@@ -238,8 +244,13 @@ void
|
|||||||
ResumeGameClock (void)
|
ResumeGameClock (void)
|
||||||
{
|
{
|
||||||
if (!clock_mutex)
|
if (!clock_mutex)
|
||||||
|
{
|
||||||
|
fprintf (stderr, "BUG: Attempted to resume non-existent game clock\n");
|
||||||
|
#ifdef DEBUG
|
||||||
|
abort();
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
LockMutex (clock_mutex);
|
LockMutex (clock_mutex);
|
||||||
if (!GameClockRunning ())
|
if (!GameClockRunning ())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -86,7 +86,8 @@ DoConfirmExit (void)
|
|||||||
BOOLEAN result;
|
BOOLEAN result;
|
||||||
static BOOLEAN in_confirm = FALSE;
|
static BOOLEAN in_confirm = FALSE;
|
||||||
fprintf (stderr, "Confirming Exit!\n");
|
fprintf (stderr, "Confirming Exit!\n");
|
||||||
if (LOBYTE (GLOBAL (CurrentActivity)) != SUPER_MELEE)
|
if (LOBYTE (GLOBAL (CurrentActivity)) != SUPER_MELEE &&
|
||||||
|
LOBYTE (GLOBAL (CurrentActivity)) != WON_LAST_BATTLE)
|
||||||
SuspendGameClock ();
|
SuspendGameClock ();
|
||||||
if (CommData.ConversationPhrases && PlayingTrack ())
|
if (CommData.ConversationPhrases && PlayingTrack ())
|
||||||
PauseTrack ();
|
PauseTrack ();
|
||||||
@@ -178,7 +179,8 @@ DoConfirmExit (void)
|
|||||||
}
|
}
|
||||||
UnlockMutex (GraphicsLock);
|
UnlockMutex (GraphicsLock);
|
||||||
|
|
||||||
if (LOBYTE (GLOBAL (CurrentActivity)) != SUPER_MELEE)
|
if (LOBYTE (GLOBAL (CurrentActivity)) != SUPER_MELEE &&
|
||||||
|
LOBYTE (GLOBAL (CurrentActivity)) != WON_LAST_BATTLE)
|
||||||
ResumeGameClock ();
|
ResumeGameClock ();
|
||||||
if (CommData.ConversationPhrases && PlayingTrack ())
|
if (CommData.ConversationPhrases && PlayingTrack ())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user