Fixes Pause dialog undrawing incorrectly during the ending sequences
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2038 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -149,6 +149,7 @@ PauseGame (void)
|
|||||||
CONTEXT OldContext;
|
CONTEXT OldContext;
|
||||||
FRAME F;
|
FRAME F;
|
||||||
HOT_SPOT OldHot;
|
HOT_SPOT OldHot;
|
||||||
|
RECT OldRect;
|
||||||
|
|
||||||
if (ActivityFrame == 0
|
if (ActivityFrame == 0
|
||||||
|| (GLOBAL (CurrentActivity) & (CHECK_ABORT | CHECK_PAUSE))
|
|| (GLOBAL (CurrentActivity) & (CHECK_ABORT | CHECK_PAUSE))
|
||||||
@@ -166,6 +167,8 @@ PauseGame (void)
|
|||||||
LockMutex (GraphicsLock);
|
LockMutex (GraphicsLock);
|
||||||
OldContext = SetContext (ScreenContext);
|
OldContext = SetContext (ScreenContext);
|
||||||
OldHot = SetFrameHot (Screen, MAKE_HOT_SPOT (0, 0));
|
OldHot = SetFrameHot (Screen, MAKE_HOT_SPOT (0, 0));
|
||||||
|
GetContextClipRect (&OldRect);
|
||||||
|
SetContextClipRect (NULL_PTR);
|
||||||
|
|
||||||
GetFrameRect (ActivityFrame, &r);
|
GetFrameRect (ActivityFrame, &r);
|
||||||
r.corner.x = (SCREEN_WIDTH - r.extent.width) >> 1;
|
r.corner.x = (SCREEN_WIDTH - r.extent.width) >> 1;
|
||||||
@@ -197,6 +200,7 @@ PauseGame (void)
|
|||||||
DrawStamp (&s);
|
DrawStamp (&s);
|
||||||
DestroyDrawable (ReleaseDrawable (s.frame));
|
DestroyDrawable (ReleaseDrawable (s.frame));
|
||||||
|
|
||||||
|
SetContextClipRect (&OldRect);
|
||||||
SetFrameHot (Screen, OldHot);
|
SetFrameHot (Screen, OldHot);
|
||||||
SetContext (OldContext);
|
SetContext (OldContext);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user