From 21d46b7e0c59b9b0385293acc90893e879363da3 Mon Sep 17 00:00:00 2001 From: stdgregwar Date: Sat, 26 Dec 2020 12:46:07 +0100 Subject: [PATCH] PSP renderer fixed --- src/render/psp/SDL_render_psp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/render/psp/SDL_render_psp.c b/src/render/psp/SDL_render_psp.c index fe4585e7d..41695327a 100644 --- a/src/render/psp/SDL_render_psp.c +++ b/src/render/psp/SDL_render_psp.c @@ -659,7 +659,7 @@ PSP_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * tex cmd->data.draw.count = count; - verts = (VertTV *) SDL_AllocateRenderVertices(renderer, count * sizeof (VertTV), 4, &cmd->data.draw.first); + verts = (VertTV *) SDL_AllocateRenderVertices(renderer, count * 2 * sizeof (VertTV), 4, &cmd->data.draw.first); if (!verts) { return -1; } @@ -677,6 +677,7 @@ PSP_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * tex verts->x = curX; verts->y = y; verts->z = 0; + verts++; curU += sourceWidth; curX += polyWidth; @@ -686,6 +687,7 @@ PSP_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * tex verts->x = curX; verts->y = (y + height); verts->z = 0; + verts++; } }