From 969999b948e4c6ecff18e6f52f184cde4d71131c Mon Sep 17 00:00:00 2001 From: gewlitys Date: Wed, 4 Dec 2002 23:35:29 +0000 Subject: [PATCH] Hyperspace saving crash which was introduced by previous patches, fixed (from slayne) git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@332 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/planets/pstarmap.c | 32 ++++++++++++++++-------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/sc2/src/sc2code/planets/pstarmap.c b/sc2/src/sc2code/planets/pstarmap.c index 73f8caaae..d367cf8e0 100644 --- a/sc2/src/sc2code/planets/pstarmap.c +++ b/sc2/src/sc2code/planets/pstarmap.c @@ -1221,21 +1221,23 @@ DoFlagshipCommands (INPUT_STATE InputState, PMENU_STATE pMS) if (GameOptions () == 0) return (FALSE); - - ClearSISRect(DRAW_SIS_DISPLAY); - DrawSISFrame(); - RepairSISBorder(); - DrawSISMessage(NULL_PTR); - DrawSISTitle(GLOBAL_SIS(PlanetName)); - DrawStarBackGround(TRUE); - OldContext = SetContext(SpaceContext); - SetContextDrawState(DEST_PIXMAP | DRAW_REPLACE); - SetSemaphore(GraphicsSem); - BatchGraphics(); - DrawPlanet(SIS_SCREEN_WIDTH - MAP_WIDTH, SIS_SCREEN_HEIGHT - MAP_HEIGHT, 0, 0); - UnbatchGraphics(); - SetContext(OldContext); - ClearSemaphore(GraphicsSem); + if (LOBYTE (GLOBAL(CurrentActivity)) == IN_INTERPLANETARY) + { + ClearSISRect(DRAW_SIS_DISPLAY); + DrawSISFrame(); + RepairSISBorder(); + DrawSISMessage(NULL_PTR); + DrawSISTitle(GLOBAL_SIS(PlanetName)); + DrawStarBackGround(TRUE); + OldContext = SetContext(SpaceContext); + SetContextDrawState(DEST_PIXMAP | DRAW_REPLACE); + SetSemaphore(GraphicsSem); + BatchGraphics(); + DrawPlanet(SIS_SCREEN_WIDTH - MAP_WIDTH, SIS_SCREEN_HEIGHT - MAP_HEIGHT, 0, 0); + UnbatchGraphics(); + SetContext(OldContext); + ClearSemaphore(GraphicsSem); + } // else // DrawMenuStateStrings (PM_SCAN, ROSTER + 1); break;