src/render/direct3d/SDL_render_d3d.c
changeset 8255 49af9be342cd
parent 8228 010ae1267485
child 8590 6e6bd53feff0
equal deleted inserted replaced
8254:f97b5166c158 8255:49af9be342cd
  1007     dst = locked.pBits;
  1007     dst = locked.pBits;
  1008     length = w * SDL_BYTESPERPIXEL(format);
  1008     length = w * SDL_BYTESPERPIXEL(format);
  1009     if (length == pitch && length == locked.Pitch) {
  1009     if (length == pitch && length == locked.Pitch) {
  1010         SDL_memcpy(dst, src, length*h);
  1010         SDL_memcpy(dst, src, length*h);
  1011     } else {
  1011     } else {
       
  1012         if (length > pitch) {
       
  1013             length = pitch;
       
  1014         }
       
  1015         if (length > locked.Pitch) {
       
  1016             length = locked.Pitch;
       
  1017         }
  1012         for (row = 0; row < h; ++row) {
  1018         for (row = 0; row < h; ++row) {
  1013             SDL_memcpy(dst, src, length);
  1019             SDL_memcpy(dst, src, length);
  1014             src += pitch;
  1020             src += pitch;
  1015             dst += locked.Pitch;
  1021             dst += locked.Pitch;
  1016         }
  1022         }