Skip to content

Commit

Permalink
Fixed bug 3297 - Horizontal and Vertical flip swapped on PSP
Browse files Browse the repository at this point in the history
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
  • Loading branch information
slouken committed Aug 12, 2017
1 parent 79a846d commit 4c239e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/render/psp/SDL_render_psp.c
Expand Up @@ -949,11 +949,11 @@ PSP_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture,
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);
}
Expand Down

0 comments on commit 4c239e5

Please sign in to comment.