Fixed concurrent fades regression; bug #1079

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3499 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
avolkov
2010-01-16 21:56:46 +00:00
parent 630748761f
commit a5e0b24a06
2 changed files with 11 additions and 2 deletions
+1
View File
@@ -1,4 +1,5 @@
Changes towards version 0.7: Changes towards version 0.7:
- Fixed concurrent screen fades regression (bug #1079) - Alex
- Removed some legacy source code files related to resources - SvdB - Removed some legacy source code files related to resources - SvdB
- Put SuperMelee source files in separate subdirectory - SvdB - Put SuperMelee source files in separate subdirectory - SvdB
- Added additive and alpha drawing modes to graphics lib - Alex - Added additive and alpha drawing modes to graphics lib - Alex
+10 -2
View File
@@ -347,14 +347,20 @@ GetFadeAmount (void)
} }
static void static void
FlushFadeXForms (void) finishPendingFade (void)
{ {
LockMutex (XFormControl.Lock);
if (fadeInterval) if (fadeInterval)
{ // end the fade immediately { // end the fade immediately
fadeAmount += fadeDelta; fadeAmount += fadeDelta;
fadeInterval = 0; fadeInterval = 0;
} }
}
static void
FlushFadeXForms (void)
{
LockMutex (XFormControl.Lock);
finishPendingFade ();
UnlockMutex (XFormControl.Lock); UnlockMutex (XFormControl.Lock);
} }
@@ -388,6 +394,8 @@ FadeScreen (ScreenFadeType fadeType, SIZE TimeInterval)
LockMutex (XFormControl.Lock); LockMutex (XFormControl.Lock);
finishPendingFade ();
if (TimeInterval <= 0) if (TimeInterval <= 0)
{ // end the fade immediately { // end the fade immediately
fadeAmount = FadeEnd; fadeAmount = FadeEnd;