From 4b6574d7c77405c5454d4549a47192dd5a5ad68b Mon Sep 17 00:00:00 2001 From: mcmartin Date: Fri, 4 Jul 2003 08:24:06 +0000 Subject: [PATCH] Pressing F10 at main menu only tries to exit as long as you hold the key down now (addresses #396) git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1012 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/confirm.c | 2 ++ sc2/src/sc2code/restart.c | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sc2/src/sc2code/confirm.c b/sc2/src/sc2code/confirm.c index 91ebeae84..6497d7ecf 100644 --- a/sc2/src/sc2code/confirm.c +++ b/sc2/src/sc2code/confirm.c @@ -149,6 +149,8 @@ DoConfirmExit (void) GameExiting = FALSE; GLOBAL (CurrentActivity) &= ~CHECK_ABORT; } + ExitRequested = FALSE; + GamePaused = FALSE; FlushInput (); SetContext (oldContext); } diff --git a/sc2/src/sc2code/restart.c b/sc2/src/sc2code/restart.c index 59433cd60..4b48b36b1 100644 --- a/sc2/src/sc2code/restart.c +++ b/sc2/src/sc2code/restart.c @@ -84,6 +84,11 @@ DWORD InTime; static BOOLEAN DoRestart (PMENU_STATE pMS) { + /* Cancel any presses of the Pause or Exit keys. */ + GamePaused = FALSE; + ExitRequested = FALSE; + + if (!pMS->Initialized) { DrawRestartMenu ((BYTE)~0, pMS->CurState, pMS->CurFrame); @@ -130,10 +135,6 @@ else if (InputState & DEVICE_EXIT) return (FALSE); SetFlashRect (NULL_PTR, (FRAME)0); ClearSemaphore (GraphicsSem); - /* Cancel any presses of the Pause or Exit keys. */ - GamePaused = FALSE; - ExitRequested = FALSE; - return (FALSE); } else