Skip to content

Commit 217bc17

Browse files
isageslouken
authored andcommitted
VITA: fix yuv texture update
(cherry picked from commit 86fd4ed)
1 parent 7107e02 commit 217bc17

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/render/vitagxm/SDL_render_vita_gxm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ static int VITA_GXM_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture,
366366
length = rect->w * SDL_BYTESPERPIXEL(texture->format);
367367
if (length == pitch && length == dpitch) {
368368
SDL_memcpy(dst, pixels, length * rect->h);
369+
pixels += pitch * rect->h;
369370
} else {
370371
for (row = 0; row < rect->h; ++row) {
371372
SDL_memcpy(dst, pixels, length);
@@ -393,6 +394,7 @@ static int VITA_GXM_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture,
393394
// U plane
394395
if (length == uv_src_pitch && length == uv_pitch) {
395396
SDL_memcpy(Udst, pixels, length * UVrect.h);
397+
pixels += uv_src_pitch * UVrect.h;
396398
} else {
397399
for (row = 0; row < UVrect.h; ++row) {
398400
SDL_memcpy(Udst, pixels, length);

0 commit comments

Comments
 (0)