Skip to content

Commit

Permalink
VITA: fix yuv texture update
Browse files Browse the repository at this point in the history
(cherry picked from commit 86fd4ed)
  • Loading branch information
isage authored and slouken committed Oct 17, 2024
1 parent 7107e02 commit 217bc17
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/render/vitagxm/SDL_render_vita_gxm.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ static int VITA_GXM_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture,
length = rect->w * SDL_BYTESPERPIXEL(texture->format);
if (length == pitch && length == dpitch) {
SDL_memcpy(dst, pixels, length * rect->h);
pixels += pitch * rect->h;
} else {
for (row = 0; row < rect->h; ++row) {
SDL_memcpy(dst, pixels, length);
Expand Down Expand Up @@ -393,6 +394,7 @@ static int VITA_GXM_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture,
// U plane
if (length == uv_src_pitch && length == uv_pitch) {
SDL_memcpy(Udst, pixels, length * UVrect.h);
pixels += uv_src_pitch * UVrect.h;
} else {
for (row = 0; row < UVrect.h; ++row) {
SDL_memcpy(Udst, pixels, length);
Expand Down

0 comments on commit 217bc17

Please sign in to comment.