Skip to content

Commit

Permalink
metal: SDL_UpdateYUVTexture shouldn't swap planes based on format.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Sep 2, 2018
1 parent 34237b8 commit 3634e56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/render/metal/SDL_render_metal.m
Expand Up @@ -956,8 +956,8 @@ - (void)dealloc
const Uint8 *Vplane, int Vpitch)
{ @autoreleasepool {
METAL_TextureData *texturedata = (__bridge METAL_TextureData *)texture->driverdata;
int Uslice = texture->format == SDL_PIXELFORMAT_YV12 ? 1 : 0;
int Vslice = texture->format == SDL_PIXELFORMAT_YV12 ? 0 : 1;
const int Uslice = 0;
const int Vslice = 1;

/* Bail out if we're supposed to update an empty rectangle */
if (rect->w <= 0 || rect->h <= 0) {
Expand Down

0 comments on commit 3634e56

Please sign in to comment.