Mercurial > sdl-ios-xcode
diff src/video/SDL_video.c @ 1678:90bf530ced8e SDL-1.3
SDL_SetVideoMode() compiles now...
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 14 Jun 2006 06:14:26 +0000 |
parents | 5e4c5e095925 |
children | 153477a6cc31 |
line wrap: on
line diff
--- a/src/video/SDL_video.c Tue Jun 13 04:37:45 2006 +0000 +++ b/src/video/SDL_video.c Wed Jun 14 06:14:26 2006 +0000 @@ -1286,6 +1286,23 @@ } int +SDL_QueryTexturePixels(SDL_TextureID textureID, void **pixels, int *pitch) +{ + SDL_Texture *texture = SDL_GetTextureFromID(textureID); + SDL_Renderer *renderer; + + if (!texture) { + return -1; + } + + renderer = texture->renderer; + if (!renderer->QueryTexturePixels) { + return -1; + } + return renderer->QueryTexturePixels(renderer, texture, pixels, pitch); +} + +int SDL_UpdateTexture(SDL_TextureID textureID, SDL_Rect * rect, const void *pixels, int pitch) {