LockMutext(GraphicsLock) before SetContext()
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3397 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1920,11 +1920,14 @@ debugContexts (void)
|
|||||||
return;
|
return;
|
||||||
inDebugContexts = true;
|
inDebugContexts = true;
|
||||||
|
|
||||||
|
LockMutex (GraphicsLock);
|
||||||
contextCount = countVisibleContexts ();
|
contextCount = countVisibleContexts ();
|
||||||
if (contextCount == 0)
|
if (contextCount == 0)
|
||||||
|
{
|
||||||
|
UnlockMutex (GraphicsLock);
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
LockMutex (GraphicsLock);
|
|
||||||
savedScreen = getScreen ();
|
savedScreen = getScreen ();
|
||||||
//UnlockMutex (GraphicsLock);
|
//UnlockMutex (GraphicsLock);
|
||||||
FlushGraphics ();
|
FlushGraphics ();
|
||||||
@@ -1974,7 +1977,9 @@ debugContexts (void)
|
|||||||
DoInput(&state, TRUE);
|
DoInput(&state, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LockMutex (GraphicsLock);
|
||||||
SetContext (orgContext);
|
SetContext (orgContext);
|
||||||
|
UnlockMutex (GraphicsLock);
|
||||||
|
|
||||||
// Destroy the debugging frame and context.
|
// Destroy the debugging frame and context.
|
||||||
DestroyContext (debugDrawContext);
|
DestroyContext (debugDrawContext);
|
||||||
|
|||||||
Reference in New Issue
Block a user