Cleanup: decoupled input timeout vars between Melee menu and Main menu

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2513 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
avolkov
2006-11-21 20:36:09 +00:00
parent ac9436552e
commit 696495da97
2 changed files with 3 additions and 5 deletions
+2 -2
View File
@@ -187,7 +187,7 @@ FRAME PickMeleeFrame;
static FRAME MeleeFrame; static FRAME MeleeFrame;
static FRAME BuildPickFrame; static FRAME BuildPickFrame;
extern QUEUE master_q; extern QUEUE master_q;
extern DWORD InTime; DWORD InTime;
PMELEE_STATE volatile pMeleeState; PMELEE_STATE volatile pMeleeState;
static BOOLEAN DoMelee (PMELEE_STATE pMS); static BOOLEAN DoMelee (PMELEE_STATE pMS);
@@ -2862,7 +2862,7 @@ Melee (void)
MenuState.InputFunc = DoMelee; MenuState.InputFunc = DoMelee;
MenuState.Initialized = FALSE; MenuState.Initialized = FALSE;
#ifdef NETMELE #ifdef NETPLAY
{ {
COUNT player; COUNT player;
for (player = 0; player < NUM_PLAYERS; player++) for (player = 0; player < NUM_PLAYERS; player++)
+1 -3
View File
@@ -106,11 +106,11 @@ DrawRestartMenu (BYTE OldState, BYTE NewState, FRAME f)
(void) OldState; /* Satisfying compiler (unused parameter) */ (void) OldState; /* Satisfying compiler (unused parameter) */
} }
DWORD InTime;
static BOOLEAN static BOOLEAN
DoRestart (PMENU_STATE pMS) DoRestart (PMENU_STATE pMS)
{ {
static DWORD InTime;
static DWORD InactTimeOut; static DWORD InactTimeOut;
/* Cancel any presses of the Pause key. */ /* Cancel any presses of the Pause key. */
@@ -240,14 +240,12 @@ else if (InputState & DEVICE_EXIT) return (FALSE);
UnlockMutex (GraphicsLock); UnlockMutex (GraphicsLock);
MouseError (); MouseError ();
SetMenuSounds (MENU_SOUND_UP | MENU_SOUND_DOWN, MENU_SOUND_SELECT); SetMenuSounds (MENU_SOUND_UP | MENU_SOUND_DOWN, MENU_SOUND_SELECT);
InTime = GetTimeCounter ();
SetTransitionSource (NULL); SetTransitionSource (NULL);
BatchGraphics (); BatchGraphics ();
DrawRestartMenuGraphic (pMS); DrawRestartMenuGraphic (pMS);
DrawRestartMenu ((BYTE)~0, pMS->CurState, pMS->CurFrame); DrawRestartMenu ((BYTE)~0, pMS->CurState, pMS->CurFrame);
ScreenTransition (3, NULL); ScreenTransition (3, NULL);
UnbatchGraphics (); UnbatchGraphics ();
return TRUE;
} }
InTime = GetTimeCounter (); InTime = GetTimeCounter ();