[Commits] SDL: Fixed bug 3297 - Horizontal and Vertical flip swapped on PSP

libsdl.org revision control commits-owner at libsdl.org
Fri Aug 11 20:54:10 PDT 2017


details:   https://hg.libsdl.org/SDL/rev/436b07ff41b4
changeset: 11229:436b07ff41b4
user:      Sam Lantinga <slouken at libsdl.org>
date:      Fri Aug 11 20:54:06 2017 -0700
description:
Fixed bug 3297 - Horizontal and Vertical flip swapped on PSP

Littlefighter19

When trying to mirror something on the PSP, I've stumbled upon the problem,
that using SDL_RenderCopyEx with SDL_FLIP_HORIZONTAL flips the image vertically, vise-versa SDL_FLIP_VERTICAL flips the image horizontally.
Proposed patch would be swapping the check in line 944 with the one in line 948 in SDL_render_psp.c

diffstat:

 src/render/psp/SDL_render_psp.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (17 lines):

diff -r af4c3dc6b97f -r 436b07ff41b4 src/render/psp/SDL_render_psp.c
--- a/src/render/psp/SDL_render_psp.c	Fri Aug 11 19:42:39 2017 -0700
+++ b/src/render/psp/SDL_render_psp.c	Fri Aug 11 20:54:06 2017 -0700
@@ -949,11 +949,11 @@
     vertices[3].y = y + sw - ch;
     vertices[3].z = 0;
 
-    if (flip & SDL_FLIP_HORIZONTAL) {
+    if (flip & SDL_FLIP_VERTICAL) {
                 Swap(&vertices[0].v, &vertices[2].v);
                 Swap(&vertices[1].v, &vertices[3].v);
     }
-    if (flip & SDL_FLIP_VERTICAL) {
+    if (flip & SDL_FLIP_HORIZONTAL) {
                 Swap(&vertices[0].u, &vertices[2].u);
                 Swap(&vertices[1].u, &vertices[3].u);
     }


More information about the commits mailing list