src/video/SDL_surface.c
changeset 6526 e9c3a540c52f
parent 6407 93f481657c6d
child 6527 c04879cd3b57
     1.1 --- a/src/video/SDL_surface.c	Mon Oct 01 00:02:07 2012 -0700
     1.2 +++ b/src/video/SDL_surface.c	Mon Oct 01 00:40:26 2012 -0700
     1.3 @@ -684,6 +684,12 @@
     1.4  SDL_LowerBlitScaled(SDL_Surface * src, SDL_Rect * srcrect,
     1.5                  SDL_Surface * dst, SDL_Rect * dstrect)
     1.6  {
     1.7 +    static const Uint32 complex_copy_flags = (
     1.8 +        SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA |
     1.9 +        SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD |
    1.10 +        SDL_COPY_COLORKEY
    1.11 +    );
    1.12 +
    1.13      /* Save off the original dst width, height */
    1.14      int dstW = dstrect->w;
    1.15      int dstH = dstrect->h;
    1.16 @@ -710,7 +716,9 @@
    1.17  
    1.18      src->map->info.flags |= SDL_COPY_NEAREST;
    1.19  
    1.20 -    if ( src->format->format == dst->format->format && !SDL_ISPIXELFORMAT_INDEXED(src->format->format) ) {
    1.21 +    if ( !(src->map->info.flags & complex_copy_flags) &&
    1.22 +         src->format->format == dst->format->format && 
    1.23 +         !SDL_ISPIXELFORMAT_INDEXED(src->format->format) ) {
    1.24          return SDL_SoftStretch( src, &final_src, dst, &final_dst );
    1.25      } else {
    1.26          return SDL_LowerBlit( src, &final_src, dst, &final_dst );