Commit 4dd90ea0 authored by Sam Lantinga's avatar Sam Lantinga

Fixed SW_SetTextureScaleMode()

Use RLE acceleration for static textures in the software renderer.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403263
parent 966af920
...@@ -376,6 +376,9 @@ SW_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) ...@@ -376,6 +376,9 @@ SW_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
texture->driverdata = texture->driverdata =
SDL_CreateRGBSurface(0, texture->w, texture->h, bpp, Rmask, Gmask, SDL_CreateRGBSurface(0, texture->w, texture->h, bpp, Rmask, Gmask,
Bmask, Amask); Bmask, Amask);
if (texture->access == SDL_TEXTUREACCESS_STATIC) {
SDL_SetSurfaceRLE(texture->driverdata, 1);
}
} }
if (!texture->driverdata) { if (!texture->driverdata) {
...@@ -458,7 +461,7 @@ static int ...@@ -458,7 +461,7 @@ static int
SW_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture) SW_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
{ {
SDL_Surface *surface = (SDL_Surface *) texture->driverdata; SDL_Surface *surface = (SDL_Surface *) texture->driverdata;
return SDL_SetSurfaceBlendMode(surface, texture->scaleMode); return SDL_SetSurfaceScaleMode(surface, texture->scaleMode);
} }
static int static int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment