src/SDL_compat.c
changeset 2228 bb67fd5ccfdb
parent 2226 0e70b4b8cf84
child 2240 eebaa05f8bd9
equal deleted inserted replaced
2227:b252359547ed 2228:bb67fd5ccfdb
   702         if (screen->flags & SDL_PREALLOC) {
   702         if (screen->flags & SDL_PREALLOC) {
   703             /* The surface memory is maintained by the renderer */
   703             /* The surface memory is maintained by the renderer */
   704             SDL_DirtyTexture(SDL_VideoTexture, numrects, rects);
   704             SDL_DirtyTexture(SDL_VideoTexture, numrects, rects);
   705         } else {
   705         } else {
   706             /* The surface memory needs to be copied to texture */
   706             /* The surface memory needs to be copied to texture */
   707             void *pixels;
       
   708             int pitch = screen->pitch;
   707             int pitch = screen->pitch;
   709             int psize = screen->format->BytesPerPixel;
   708             int psize = screen->format->BytesPerPixel;
   710             for (i = 0; i < numrects; ++i) {
   709             for (i = 0; i < numrects; ++i) {
   711                 const SDL_Rect *rect = &rects[i];
   710                 const SDL_Rect *rect = &rects[i];
   712                 void *pixels =
   711                 void *pixels =