Mercurial > sdl-ios-xcode
diff src/video/SDL_renderer_sw.c @ 2802:c2834344ca44
Fixed SW_SetTextureScaleMode()
Use RLE acceleration for static textures in the software renderer.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 29 Nov 2008 00:11:35 +0000 |
parents | 6bacfecbf27e |
children | 27cb878a278e |
line wrap: on
line diff
--- a/src/video/SDL_renderer_sw.c Sat Nov 29 00:10:59 2008 +0000 +++ b/src/video/SDL_renderer_sw.c Sat Nov 29 00:11:35 2008 +0000 @@ -376,6 +376,9 @@ texture->driverdata = SDL_CreateRGBSurface(0, texture->w, texture->h, bpp, Rmask, Gmask, Bmask, Amask); + if (texture->access == SDL_TEXTUREACCESS_STATIC) { + SDL_SetSurfaceRLE(texture->driverdata, 1); + } } if (!texture->driverdata) { @@ -458,7 +461,7 @@ SW_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture) { SDL_Surface *surface = (SDL_Surface *) texture->driverdata; - return SDL_SetSurfaceBlendMode(surface, texture->scaleMode); + return SDL_SetSurfaceScaleMode(surface, texture->scaleMode); } static int