From b38ef3cdb6a9b2502c128eeb04acb145ba9b5308 Mon Sep 17 00:00:00 2001 From: mcmartin Date: Sun, 25 Dec 2005 05:05:45 +0000 Subject: [PATCH] Restricts which keys will trigger a fadeout from SuperMelee summary Incidentally fixes bug #547. The related bug #455 is still live. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2113 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 2 ++ sc2/src/sc2code/pickmele.c | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 063c03889..144e38cf6 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,6 @@ Changes towards version 0.5: +- Only SELECT and CANCEL trigger the fade-to-black at the end of a + Super Melee, solving the issue in bug #547 - Michael - Admiral ZEX is no longer referred to as "Commander" or "Zex" (bug #811) - Michael - Keypress status is not reset when entering battle mode (solves diff --git a/sc2/src/sc2code/pickmele.c b/sc2/src/sc2code/pickmele.c index fbeaf622c..01172b2b7 100644 --- a/sc2/src/sc2code/pickmele.c +++ b/sc2/src/sc2code/pickmele.c @@ -299,18 +299,19 @@ GetMeleeStarShip (STARSHIPPTR LastStarShipPtr, COUNT which_player) SetContext (OldContext); UnlockMutex (GraphicsLock); - PressState = AnyButtonPress (TRUE); + PressState = PulsedInputState.key[KEY_MENU_SELECT] || PulsedInputState.key[KEY_MENU_CANCEL]; do { - ButtonState = AnyButtonPress (TRUE); + UpdateInputState (); + ButtonState = PulsedInputState.key[KEY_MENU_SELECT] || PulsedInputState.key[KEY_MENU_CANCEL]; if (PressState) { PressState = ButtonState; ButtonState = FALSE; } - } while (!ButtonState + } while (!(GLOBAL (CurrentActivity) & CHECK_ABORT) && (!ButtonState && (!(PlayerControl[0] & PlayerControl[1] & PSYTRON_CONTROL) - || (TaskSwitch (), GetTimeCounter ()) < TimeOut)); + || (TaskSwitch (), GetTimeCounter ()) < TimeOut))); LockMutex (GraphicsLock);