src/render/SDL_render.c
changeset 7563 c128ed448c30
parent 7511 4ce3cc948a00
child 7719 31b5f9ff36ca
child 8477 ad08f0d710f3
     1.1 --- a/src/render/SDL_render.c	Thu Aug 01 01:29:07 2013 -0700
     1.2 +++ b/src/render/SDL_render.c	Thu Aug 01 09:15:36 2013 -0700
     1.3 @@ -1549,22 +1549,10 @@
     1.4      real_dstrect.x = 0;
     1.5      real_dstrect.y = 0;
     1.6      if (dstrect) {
     1.7 -        if (!SDL_IntersectRect(dstrect, &real_dstrect, &real_dstrect)) {
     1.8 +        if (!SDL_HasIntersection(dstrect, &real_dstrect)) {
     1.9              return 0;
    1.10          }
    1.11 -        /* Clip srcrect by the same amount as dstrect was clipped */
    1.12 -        if (dstrect->w != real_dstrect.w) {
    1.13 -            int deltax = (real_dstrect.x - dstrect->x);
    1.14 -            int deltaw = (real_dstrect.w - dstrect->w);
    1.15 -            real_srcrect.x += (deltax * real_srcrect.w) / dstrect->w;
    1.16 -            real_srcrect.w += (deltaw * real_srcrect.w) / dstrect->w;
    1.17 -        }
    1.18 -        if (dstrect->h != real_dstrect.h) {
    1.19 -            int deltay = (real_dstrect.y - dstrect->y);
    1.20 -            int deltah = (real_dstrect.h - dstrect->h);
    1.21 -            real_srcrect.y += (deltay * real_srcrect.h) / dstrect->h;
    1.22 -            real_srcrect.h += (deltah * real_srcrect.h) / dstrect->h;
    1.23 -        }
    1.24 +        real_dstrect = *dstrect;
    1.25      }
    1.26  
    1.27      if (texture->native) {