src/video/SDL_renderer_sw.c
changeset 2802 c2834344ca44
parent 2786 6bacfecbf27e
child 2810 27cb878a278e
equal deleted inserted replaced
2801:5eb95b8adc1a 2802:c2834344ca44
   374         }
   374         }
   375 
   375 
   376         texture->driverdata =
   376         texture->driverdata =
   377             SDL_CreateRGBSurface(0, texture->w, texture->h, bpp, Rmask, Gmask,
   377             SDL_CreateRGBSurface(0, texture->w, texture->h, bpp, Rmask, Gmask,
   378                                  Bmask, Amask);
   378                                  Bmask, Amask);
       
   379         if (texture->access == SDL_TEXTUREACCESS_STATIC) {
       
   380             SDL_SetSurfaceRLE(texture->driverdata, 1);
       
   381         }
   379     }
   382     }
   380 
   383 
   381     if (!texture->driverdata) {
   384     if (!texture->driverdata) {
   382         return -1;
   385         return -1;
   383     }
   386     }
   456 
   459 
   457 static int
   460 static int
   458 SW_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
   461 SW_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
   459 {
   462 {
   460     SDL_Surface *surface = (SDL_Surface *) texture->driverdata;
   463     SDL_Surface *surface = (SDL_Surface *) texture->driverdata;
   461     return SDL_SetSurfaceBlendMode(surface, texture->scaleMode);
   464     return SDL_SetSurfaceScaleMode(surface, texture->scaleMode);
   462 }
   465 }
   463 
   466 
   464 static int
   467 static int
   465 SW_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
   468 SW_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
   466                  const SDL_Rect * rect, const void *pixels, int pitch)
   469                  const SDL_Rect * rect, const void *pixels, int pitch)