| 1686 | #endif /* SDL_HAVE_YUV */ |
| 1687 | |
| 1688 | static int |
| 1689 | SDL_LockTextureNative(SDL_Texture * texture, const SDL_Rect * rect, |
| 1690 | void **pixels, int *pitch) |
| 1691 | { |
| 1692 | texture->locked_rect = *rect; |
| 1693 | *pixels = (void *) ((Uint8 *) texture->pixels + |
| 1694 | rect->y * texture->pitch + |
| 1695 | rect->x * SDL_BYTESPERPIXEL(texture->format)); |
| 1696 | *pitch = texture->pitch; |
| 1697 | return 0; |
| 1698 | } |
| 1699 | |
| 1700 | int |
| 1701 | SDL_LockTexture(SDL_Texture * texture, const SDL_Rect * rect, |