Fix for #1577, SDL_RenderCopyEx - Runtime check fails when dstrect == NULL and center == NULL
authorGabriel Jacobo <gabomdq@gmail.com>
Fri, 24 Aug 2012 11:56:21 -0300
changeset 6399 3fb0c82693af
parent 6398 c294faf5fce5
child 6400 2ed5671bc5e0
Fix for #1577, SDL_RenderCopyEx - Runtime check fails when dstrect == NULL and center == NULL Thanks Michael Ehrmann.
src/render/SDL_render.c
--- a/src/render/SDL_render.c	Wed Aug 15 21:00:33 2012 -0400
+++ b/src/render/SDL_render.c	Fri Aug 24 11:56:21 2012 -0300
@@ -1260,10 +1260,10 @@
     /* We don't intersect the dstrect with the viewport as RenderCopy does because of potential rotation clipping issues... TODO: should we? */
     if (dstrect) real_dstrect = *dstrect;
     else {
-        real_srcrect.x = 0;
-        real_srcrect.y = 0;
-        real_srcrect.w = renderer->viewport.w;
-        real_srcrect.h = renderer->viewport.h;
+        real_dstrect.x = 0;
+        real_dstrect.y = 0;
+        real_dstrect.w = renderer->viewport.w;
+        real_dstrect.h = renderer->viewport.h;
     }
 
     if (texture->native) {