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 7989 c13adfce24a9
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
--- a/src/render/direct3d/SDL_render_d3d.c	Thu Nov 14 20:24:15 2013 -0500
+++ b/src/render/direct3d/SDL_render_d3d.c	Thu Nov 14 21:39:54 2013 -0800
@@ -1635,26 +1635,22 @@
     centerx = center->x;
     centery = center->y;
 
-    if ((flip & SDL_FLIP_VERTICAL) && (flip & SDL_FLIP_HORIZONTAL)) {
-        miny = dstrect->h - centery;
-        maxy = -centery;
-        minx = dstrect->w - centerx;
-        maxx = -centerx;
-    } else if (flip & SDL_FLIP_HORIZONTAL) {
-        miny = -centery;
-        maxy = dstrect->h - centery;
-        minx = dstrect->w - centerx;
-        maxx = -centerx;
-    } else if (flip & SDL_FLIP_VERTICAL) {
-        miny = dstrect->h - centery;
-        maxy = -centery;
-        minx = -centerx;
-        maxx = dstrect->w - centerx;
-    } else {
-        miny = -centery;
-        maxy = dstrect->h - centery;
-        minx = -centerx;
-        maxx = dstrect->w - centerx;
+    if (flip & SDL_FLIP_HORIZONTAL) {
+        minx = dstrect->w - centerx - 0.5f;
+        maxx = -centerx - 0.5f;
+    }
+    else {
+        minx = -centerx - 0.5f;
+        maxx = dstrect->w - centerx - 0.5f;
+    }
+
+    if (flip & SDL_FLIP_VERTICAL) {
+        miny = dstrect->h - centery - 0.5f;
+        maxy = -centery - 0.5f;
+    }
+    else {
+        miny = -centery - 0.5f;
+        maxy = dstrect->h - centery - 0.5f;
     }
 
     minu = (float) srcrect->x / texture->w;
--- a/src/render/opengl/SDL_render_gl.c	Thu Nov 14 20:24:15 2013 -0500
+++ b/src/render/opengl/SDL_render_gl.c	Thu Nov 14 21:39:54 2013 -0800
@@ -1250,26 +1250,22 @@
     centerx = center->x;
     centery = center->y;
 
-    if ((flip & SDL_FLIP_VERTICAL) && (flip & SDL_FLIP_HORIZONTAL)) {
-        miny = dstrect->h - centery;
-        maxy = -centery;
-        minx = dstrect->w - centerx;
-        maxx = -centerx;
-    } else if (flip & SDL_FLIP_HORIZONTAL) {
-        miny = -centery;
-        maxy = dstrect->h - centery;
-        minx = dstrect->w - centerx;
+    if (flip & SDL_FLIP_HORIZONTAL) {
+        minx =  dstrect->w - centerx;
         maxx = -centerx;
-    } else if (flip & SDL_FLIP_VERTICAL) {
-        miny = dstrect->h - centery;
-        maxy = -centery;
+    }
+    else {
         minx = -centerx;
-        maxx = dstrect->w - centerx;
-    } else {
+        maxx =  dstrect->w - centerx;
+    }
+
+    if (flip & SDL_FLIP_VERTICAL) {
+        miny =  dstrect->h - centery;
+        maxy = -centery;
+    }
+    else {
         miny = -centery;
-        maxy = dstrect->h - centery;
-        minx = -centerx;
-        maxx = dstrect->w - centerx;
+        maxy =  dstrect->h - centery;
     }
 
     minu = (GLfloat) srcrect->x / texture->w;