diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 3d9eb5021..c3659f6c5 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,5 @@ Changes towards version 0.3: +- Fix lockup in cyborg melee (fixes 204 and 218) from chmmravatar - Added -g option to control gamma correction, from chmmravatar - Restored the CondBank to actually use condition variables properly (resolves a race condition under OpenBSD) diff --git a/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c b/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c index b3e410530..e92694a4f 100644 --- a/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c +++ b/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c @@ -509,6 +509,7 @@ TFB_FlushGraphics () // Only call from main thread!! int x = DC.data.image.x; int y = DC.data.image.y; + LockMutex (DC_image->mutex); if (DC.data.image.scale) TFB_BBox_RegisterCanvas (DC_image->ScaledImg, x, y); else @@ -522,6 +523,7 @@ TFB_FlushGraphics () // Only call from main thread!! { pal = DC_image->Palette; } + UnlockMutex (DC_image->mutex); TFB_DrawCanvas_Image (DC_image, x, y, DC.data.image.scale, pal,