Locking fixes (#504)
You *must* hold the GraphicsLock when calling SetFlashRect. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1265 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
Changes towards version 0.4:
|
||||
- Patches to enforce the invariant that the GraphicsLock is held when
|
||||
SetFlashRect is called (bug #504) -Michael
|
||||
- Major refactoring of threadlib; see doc/devel/threads -Michael
|
||||
- Downgraded the GraphicsLock to an ordinary Mutex -Michael
|
||||
- Added movie player; only movies defined are intro and ending;
|
||||
|
||||
@@ -1014,7 +1014,9 @@ Restart:
|
||||
}
|
||||
else if (CurrentMenuState.cancel)
|
||||
{
|
||||
LockMutex (GraphicsLock);
|
||||
SetFlashRect ((PRECT)~0L, (FRAME)0);
|
||||
UnlockMutex (GraphicsLock);
|
||||
pMS->ModuleFrame = 0;
|
||||
pMS->CurState = (BYTE)pMS->delta_item;
|
||||
ResumeMusic ();
|
||||
|
||||
@@ -755,7 +755,9 @@ DoModifyShips (PMENU_STATE pMS)
|
||||
else if (cancel)
|
||||
{
|
||||
pMS->delta_item ^= MODIFY_CREW_FLAG;
|
||||
LockMutex (GraphicsLock);
|
||||
SetFlashRect ((PRECT)~0L, (FRAME)0);
|
||||
UnlockMutex (GraphicsLock);
|
||||
DrawMenuStateStrings (PM_CREW, SHIPYARD_CREW);
|
||||
}
|
||||
else if (select)
|
||||
|
||||
Reference in New Issue
Block a user