Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Fixed SW_SetTextureScaleMode()
Use RLE acceleration for static textures in the software renderer.
  • Loading branch information
slouken committed Nov 29, 2008
1 parent d1608f8 commit 6f93a6c7e2972e319a8a2e3119ac09393f70f1b6
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/video/SDL_renderer_sw.c
@@ -376,6 +376,9 @@ SW_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
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 @@ static int
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

0 comments on commit 6f93a6c

Please sign in to comment.