rem: ClearSemaphore (&GraphicsSem);
add: ClearSemaphore (GraphicsSem);
context: InitSolarSys (void){	BOOLEAN InnerSystem;	BOOLEAN Reentry;	SetSemaphore (&GraphicsSem);LoadIPData ();LoadLanderData ();	ClearSemaphore (&GraphicsSem);	pSolarSysState->MenuState.InputFunc = DoFlagshipCommands;	Reentry = (BOOLEAN)(GLOBAL (ShipStamp.frame) != 0);	if (!Reentry)	{		GLOBAL (autopilot.x) =				GLOBAL (autopilot.y) = ~0;		GLOBAL (ShipStamp.origin.x) = SIS_SCREEN_WIDTH >> 1;		GLOBAL (ShipStamp.origin.y) = SIS_SCREEN_HEIGHT >> 1;		GLOBAL (ShipStamp.origin.y) += (SIS_SCREEN_HEIGHT >> 1) - 1;		pSolarSysState->SunDesc[0].radius = MAX_ZOOM_RADIUS;		XFormIPLoc (&GLOBAL (ShipStamp.origin),				&GLOBAL (ip_location),				FALSE);	}	LoadSolarSys ();	InnerSystem = ValidateOrbits ();	if (Reentry)	{		(*pSolarSysState->GenFunc) (REINIT_NPCS);	}	else	{		battle_counter = 0;		GLOBAL (BattleGroupRef) = 0;		ReinitQueue (&GLOBAL (npc_built_ship_q));		(*pSolarSysState->GenFunc) (INIT_NPCS);	}	if (pSolarSysState->MenuState.Initialized == 0)	{		BatchGraphics ();		draw_sys_flags |= UNBATCH_SYS;				if (LastActivity & (CHECK_LOAD | CHECK_RESTART))		{			if ((LastActivity & (CHECK_LOAD | CHECK_RESTART)) == LastActivity)			{				extern ACTIVITY NextActivity;				DrawSISFrame ();				if (NextActivity)					LastActivity &= ~(CHECK_LOAD | CHECK_RESTART);			}			else			{				SetSemaphore (&GraphicsSem);				ClearSISRect (DRAW_SIS_DISPLAY);				ClearSemaphore (&GraphicsSem);				LastActivity &= ~CHECK_LOAD;			}		}// SetSemaphore (&GraphicsSem);		DrawSISMessage (NULL_PTR);		SetContext (SpaceContext);		SetContextFGFrame (Screen);		SetContextBGFrame ((FRAME)0);		SetContextDrawState (DEST_PIXMAP | DRAW_REPLACE);		SetContextBackGroundColor (BLACK_COLOR);// ClearSemaphore (&GraphicsSem);		if (InnerSystem)		{			SetGraphicGrabOther (1); // since Unbatch won't have flipped yet			DrawInnerSystem ();			SetGraphicGrabOther (0);			if (draw_sys_flags & UNBATCH_SYS)			{				draw_sys_flags &= ~UNBATCH_SYS;				ScreenTransition (3, 0);				UnbatchGraphics ();				LoadIntoExtraScreen (0);			}		}		else		{			SetSemaphore (&GraphicsSem);			DrawHyperCoords (CurStarDescPtr->star_pt); /* Adjust position */			ClearSemaphore (&GraphicsSem);					/* force a redraw */			pSolarSysState->SunDesc[0].radius = MAX_ZOOM_RADIUS << 1;		}	}}