Skip to content

Commit

Permalink
Do less calculations in PSP_LockTexture
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkwouter authored Jun 14, 2024
1 parent a1dd1ec commit 6042994
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/render/psp/SDL_render_psp.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,9 @@ static int PSP_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture,
prepareTextureForDownload(texture);

*pixels =
(void *)((Uint8 *)psp_tex->data + rect->y * psp_tex->width * SDL_BYTESPERPIXEL(texture->format) +
(void *)((Uint8 *)psp_tex->data + rect->y * psp_tex->pitch +
rect->x * SDL_BYTESPERPIXEL(texture->format));
*pitch = psp_tex->width * SDL_BYTESPERPIXEL(texture->format);
*pitch = psp_tex->pitch;

return 0;
}
Expand Down

0 comments on commit 6042994

Please sign in to comment.