src/video/directfb/SDL_DirectFB_render.c
changeset 2244 5234868559fa
parent 2241 4932f192c565
child 2698 e1da92da346c
child 2721 e82a0e3e9b0e
equal deleted inserted replaced
2243:5523312f311e 2244:5234868559fa
   505     DirectFB_TextureData *data = (DirectFB_TextureData *) texture->driverdata;
   505     DirectFB_TextureData *data = (DirectFB_TextureData *) texture->driverdata;
   506     DirectFB_RenderData *renderdata =
   506     DirectFB_RenderData *renderdata =
   507         (DirectFB_RenderData *) renderer->driverdata;
   507         (DirectFB_RenderData *) renderer->driverdata;
   508     DFBResult ret;
   508     DFBResult ret;
   509     Uint8 *dpixels;
   509     Uint8 *dpixels;
   510     int   dpitch;
   510     int dpitch;
   511     Uint8 *src, *dst;
   511     Uint8 *src, *dst;
   512     int row;
   512     int row;
   513     size_t length;
   513     size_t length;
   514 
   514 
   515     SDL_DFB_CHECKERR(data->surface->Lock(data->surface,
   515     SDL_DFB_CHECKERR(data->surface->Lock(data->surface,
   523     for (row = 0; row < rect->h; ++row) {
   523     for (row = 0; row < rect->h; ++row) {
   524         SDL_memcpy(dst, src, length);
   524         SDL_memcpy(dst, src, length);
   525         src += pitch;
   525         src += pitch;
   526         dst += dpitch;
   526         dst += dpitch;
   527     }
   527     }
   528     SDL_DFB_CHECKERR(data->surface->Unlock(data->surface) );
   528     SDL_DFB_CHECKERR(data->surface->Unlock(data->surface));
   529     return 0;
   529     return 0;
   530 error:
   530   error:
   531 	return 1;
   531     return 1;
   532 
   532 
   533 }
   533 }
   534 
   534 
   535 static int
   535 static int
   536 DirectFB_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
   536 DirectFB_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,