lock unlock
This commit is contained in:
parent
91a46a853f
commit
ed1e26d151
|
@ -593,7 +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);
|
||||
if (SDL_LockSurface(img) == 0) {
|
||||
ptr = (Uint32*)img->pixels;
|
||||
size = img->w * img->h;
|
||||
while (size --) {
|
||||
|
@ -605,6 +605,7 @@ img_t gfx_alpha_img(img_t src, int alpha)
|
|||
ptr ++;
|
||||
}
|
||||
SDL_UnlockSurface(img);
|
||||
}
|
||||
return img;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue