src/render/SDL_yuv_sw.c
changeset 5269 11bd1585efb5
parent 5262 b530ef003506
child 5535 96594ac5fd1a
equal deleted inserted replaced
5268:c5a04f3c3908 5269:11bd1585efb5
  1125                 || rect->h != swdata->h)) {
  1125                 || rect->h != swdata->h)) {
  1126             SDL_SetError
  1126             SDL_SetError
  1127                 ("YV12 and IYUV textures only support full surface updates");
  1127                 ("YV12 and IYUV textures only support full surface updates");
  1128             return -1;
  1128             return -1;
  1129         }
  1129         }
  1130         SDL_memcpy(swdata->pixels, pixels, swdata->h * swdata->w * 2);
  1130         SDL_memcpy(swdata->pixels, pixels,
       
  1131                    (swdata->h * swdata->w) + (swdata->h * swdata->w) / 2);
  1131         break;
  1132         break;
  1132     case SDL_PIXELFORMAT_YUY2:
  1133     case SDL_PIXELFORMAT_YUY2:
  1133     case SDL_PIXELFORMAT_UYVY:
  1134     case SDL_PIXELFORMAT_UYVY:
  1134     case SDL_PIXELFORMAT_YVYU:
  1135     case SDL_PIXELFORMAT_YVYU:
  1135         {
  1136         {