Fixes a bug in SDL_UpdateTexture when using SDL_RENDERER_SOFTWARE and texture access is SDL_TEXTUREACCESS_STATIC
--- a/src/render/software/SDL_render_sw.c Sat Jul 16 14:59:12 2011 -0700
+++ b/src/render/software/SDL_render_sw.c Fri Jun 10 12:13:06 2011 +0300
@@ -240,6 +240,8 @@
int row;
size_t length;
+ if(SDL_MUSTLOCK(surface))
+ SDL_LockSurface(surface);
src = (Uint8 *) pixels;
dst = (Uint8 *) surface->pixels +
rect->y * surface->pitch +
@@ -250,6 +252,8 @@
src += pitch;
dst += surface->pitch;
}
+ if(SDL_MUSTLOCK(surface))
+ SDL_UnlockSurface(surface);
return 0;
}