Backed out changeset e8f93c2ebda3 - it didn't actually do anything useful
authorSam Lantinga <slouken@libsdl.org>
Thu, 14 Nov 2013 21:39:54 -0800
changeset 7989c13adfce24a9
parent 7988 9f15374d872d
child 7990 a05a48e493c0
Backed out changeset e8f93c2ebda3 - it didn't actually do anything useful
src/render/direct3d/SDL_render_d3d.c
src/render/opengl/SDL_render_gl.c
     1.1 --- a/src/render/direct3d/SDL_render_d3d.c	Thu Nov 14 20:24:15 2013 -0500
     1.2 +++ b/src/render/direct3d/SDL_render_d3d.c	Thu Nov 14 21:39:54 2013 -0800
     1.3 @@ -1635,26 +1635,22 @@
     1.4      centerx = center->x;
     1.5      centery = center->y;
     1.6  
     1.7 -    if ((flip & SDL_FLIP_VERTICAL) && (flip & SDL_FLIP_HORIZONTAL)) {
     1.8 -        miny = dstrect->h - centery;
     1.9 -        maxy = -centery;
    1.10 -        minx = dstrect->w - centerx;
    1.11 -        maxx = -centerx;
    1.12 -    } else if (flip & SDL_FLIP_HORIZONTAL) {
    1.13 -        miny = -centery;
    1.14 -        maxy = dstrect->h - centery;
    1.15 -        minx = dstrect->w - centerx;
    1.16 -        maxx = -centerx;
    1.17 -    } else if (flip & SDL_FLIP_VERTICAL) {
    1.18 -        miny = dstrect->h - centery;
    1.19 -        maxy = -centery;
    1.20 -        minx = -centerx;
    1.21 -        maxx = dstrect->w - centerx;
    1.22 -    } else {
    1.23 -        miny = -centery;
    1.24 -        maxy = dstrect->h - centery;
    1.25 -        minx = -centerx;
    1.26 -        maxx = dstrect->w - centerx;
    1.27 +    if (flip & SDL_FLIP_HORIZONTAL) {
    1.28 +        minx = dstrect->w - centerx - 0.5f;
    1.29 +        maxx = -centerx - 0.5f;
    1.30 +    }
    1.31 +    else {
    1.32 +        minx = -centerx - 0.5f;
    1.33 +        maxx = dstrect->w - centerx - 0.5f;
    1.34 +    }
    1.35 +
    1.36 +    if (flip & SDL_FLIP_VERTICAL) {
    1.37 +        miny = dstrect->h - centery - 0.5f;
    1.38 +        maxy = -centery - 0.5f;
    1.39 +    }
    1.40 +    else {
    1.41 +        miny = -centery - 0.5f;
    1.42 +        maxy = dstrect->h - centery - 0.5f;
    1.43      }
    1.44  
    1.45      minu = (float) srcrect->x / texture->w;
     2.1 --- a/src/render/opengl/SDL_render_gl.c	Thu Nov 14 20:24:15 2013 -0500
     2.2 +++ b/src/render/opengl/SDL_render_gl.c	Thu Nov 14 21:39:54 2013 -0800
     2.3 @@ -1250,26 +1250,22 @@
     2.4      centerx = center->x;
     2.5      centery = center->y;
     2.6  
     2.7 -    if ((flip & SDL_FLIP_VERTICAL) && (flip & SDL_FLIP_HORIZONTAL)) {
     2.8 -        miny = dstrect->h - centery;
     2.9 +    if (flip & SDL_FLIP_HORIZONTAL) {
    2.10 +        minx =  dstrect->w - centerx;
    2.11 +        maxx = -centerx;
    2.12 +    }
    2.13 +    else {
    2.14 +        minx = -centerx;
    2.15 +        maxx =  dstrect->w - centerx;
    2.16 +    }
    2.17 +
    2.18 +    if (flip & SDL_FLIP_VERTICAL) {
    2.19 +        miny =  dstrect->h - centery;
    2.20          maxy = -centery;
    2.21 -        minx = dstrect->w - centerx;
    2.22 -        maxx = -centerx;
    2.23 -    } else if (flip & SDL_FLIP_HORIZONTAL) {
    2.24 +    }
    2.25 +    else {
    2.26          miny = -centery;
    2.27 -        maxy = dstrect->h - centery;
    2.28 -        minx = dstrect->w - centerx;
    2.29 -        maxx = -centerx;
    2.30 -    } else if (flip & SDL_FLIP_VERTICAL) {
    2.31 -        miny = dstrect->h - centery;
    2.32 -        maxy = -centery;
    2.33 -        minx = -centerx;
    2.34 -        maxx = dstrect->w - centerx;
    2.35 -    } else {
    2.36 -        miny = -centery;
    2.37 -        maxy = dstrect->h - centery;
    2.38 -        minx = -centerx;
    2.39 -        maxx = dstrect->w - centerx;
    2.40 +        maxy =  dstrect->h - centery;
    2.41      }
    2.42  
    2.43      minu = (GLfloat) srcrect->x / texture->w;