From 91a46a853fa758cc90412121abad21e68ab3290f Mon Sep 17 00:00:00 2001
From: "p.kosyh"
Date: Wed, 13 Apr 2011 18:04:18 +0000
Subject: [PATCH] lock unlock
---
src/sdl-instead/graphics.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/sdl-instead/graphics.c b/src/sdl-instead/graphics.c
index 29c35de..a792c1c 100644
--- a/src/sdl-instead/graphics.c
+++ b/src/sdl-instead/graphics.c
@@ -593,6 +593,7 @@ img_t gfx_alpha_img(img_t src, int alpha)
if (!img)
return NULL;
SDL_SetAlpha(img, SDL_SRCALPHA, SDL_ALPHA_OPAQUE);
+ SDL_LockSurface(img);
ptr = (Uint32*)img->pixels;
size = img->w * img->h;
while (size --) {
@@ -603,6 +604,7 @@ img_t gfx_alpha_img(img_t src, int alpha)
*ptr = col;
ptr ++;
}
+ SDL_UnlockSurface(img);
return img;
}