Fix flashing when pressing the 'spin ship' button on an empty slot

or the flag ship.



git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3741 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
Meep-Eep
2012-01-08 13:49:39 +00:00
parent a86e795d9e
commit 3da5e55c1c
+2 -5
View File
@@ -712,10 +712,7 @@ DMS_SpinShip (MENU_STATE *pMS, HSHIPFRAG hStarShip)
SetContextClipRect (&OldClipRect); SetContextClipRect (&OldClipRect);
SetContext (OldContext); SetContext (OldContext);
if (hStarShip)
return TRUE; return TRUE;
return FALSE;
} }
#endif /* WANT_SHIP_SPINS */ #endif /* WANT_SHIP_SPINS */
@@ -985,8 +982,8 @@ DMS_AddEscortShip (MENU_STATE *pMS, BOOLEAN special, BOOLEAN select,
if (special) if (special)
{ {
HSHIPFRAG hStarShip = GetEscortByStarShipIndex (pMS->delta_item); HSHIPFRAG hStarShip = GetEscortByStarShipIndex (pMS->delta_item);
DMS_SpinShip (pMS, hStarShip);
LockMutex (GraphicsLock); LockMutex (GraphicsLock);
if (DMS_SpinShip (pMS, hStarShip))
DMS_SetMode (pMS, DMS_Mode_addEscort); DMS_SetMode (pMS, DMS_Mode_addEscort);
UnlockMutex (GraphicsLock); UnlockMutex (GraphicsLock);
return; return;
@@ -1169,7 +1166,7 @@ DMS_NavigateShipSlots (MENU_STATE *pMS, BOOLEAN special, BOOLEAN select,
#else #else
if (special) if (special)
{ {
DMS_SpinShip (pMS, hStarShip); if (DMS_SpinShip (pMS, hStarShip))
DMS_SetMode (pMS, DMS_Mode_navigate); DMS_SetMode (pMS, DMS_Mode_navigate);
} }
else else