From 3a4fa3ae20b14a77c44f69180175da5ecbe8dc2f Mon Sep 17 00:00:00 2001 From: mcmartin Date: Sat, 3 Feb 2007 00:44:30 +0000 Subject: [PATCH] Added input frames to PauseGame(), stopping infinite loops git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2696 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 1 + sc2/src/sc2code/util.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 71fe3b1d5..3dbac952f 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Added Input Frames to pause code to stop infinite loops - Michael - Added more netplay debug code - SvdB - Added uio_fprintf() and uio_vfprintf() - SvdB - Any input will register for at least one frame (Bug #864) - Michael diff --git a/sc2/src/sc2code/util.c b/sc2/src/sc2code/util.c index e689a51a9..949f22b77 100644 --- a/sc2/src/sc2code/util.c +++ b/sc2/src/sc2code/util.c @@ -189,13 +189,22 @@ PauseGame (void) //LockMutex (GraphicsLock); while (ImmediateInputState.menu[KEY_PAUSE]) + { + BeginInputFrame (); TaskSwitch (); + } while (!ImmediateInputState.menu[KEY_PAUSE]) + { + BeginInputFrame (); TaskSwitch (); + } while (ImmediateInputState.menu[KEY_PAUSE]) + { + BeginInputFrame (); TaskSwitch (); + } GamePaused = FALSE;