Fixed SW_SetTextureScaleMode()
authorSam Lantinga <slouken@libsdl.org>
Sat, 29 Nov 2008 00:11:35 +0000
changeset 2802c2834344ca44
parent 2801 5eb95b8adc1a
child 2803 8fe261aae1bb
Fixed SW_SetTextureScaleMode()
Use RLE acceleration for static textures in the software renderer.
src/video/SDL_renderer_sw.c
     1.1 --- a/src/video/SDL_renderer_sw.c	Sat Nov 29 00:10:59 2008 +0000
     1.2 +++ b/src/video/SDL_renderer_sw.c	Sat Nov 29 00:11:35 2008 +0000
     1.3 @@ -376,6 +376,9 @@
     1.4          texture->driverdata =
     1.5              SDL_CreateRGBSurface(0, texture->w, texture->h, bpp, Rmask, Gmask,
     1.6                                   Bmask, Amask);
     1.7 +        if (texture->access == SDL_TEXTUREACCESS_STATIC) {
     1.8 +            SDL_SetSurfaceRLE(texture->driverdata, 1);
     1.9 +        }
    1.10      }
    1.11  
    1.12      if (!texture->driverdata) {
    1.13 @@ -458,7 +461,7 @@
    1.14  SW_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
    1.15  {
    1.16      SDL_Surface *surface = (SDL_Surface *) texture->driverdata;
    1.17 -    return SDL_SetSurfaceBlendMode(surface, texture->scaleMode);
    1.18 +    return SDL_SetSurfaceScaleMode(surface, texture->scaleMode);
    1.19  }
    1.20  
    1.21  static int