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
This commit is contained in:
parent
966af920a2
commit
4dd90ea023
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue