src/render/software/SDL_render_sw.c
changeset 5296 48067bfc300c
parent 5288 d4381f3b0d1e
child 5297 1800dc39b74c
equal deleted inserted replaced
5295:b88d05603e4b 5296:48067bfc300c
   362     SDL_Rect final_rect = *dstrect;
   362     SDL_Rect final_rect = *dstrect;
   363 
   363 
   364     if (!surface) {
   364     if (!surface) {
   365         return -1;
   365         return -1;
   366     }
   366     }
   367     return SDL_BlitSurface(src, srcrect, surface, &final_rect);
   367 
       
   368     if ( srcrect->w == final_rect.w && srcrect->h == final_rect.h ) {
       
   369         return SDL_BlitSurface(src, srcrect, surface, &final_rect);
       
   370     } else {
       
   371         return SDL_BlitScaled(src, srcrect, surface, &final_rect);
       
   372     }
   368 }
   373 }
   369 
   374 
   370 static int
   375 static int
   371 SW_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
   376 SW_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
   372                     Uint32 format, void * pixels, int pitch)
   377                     Uint32 format, void * pixels, int pitch)