Mercurial > sdl-ios-xcode
diff src/SDL_compat.c @ 1974:70deaf574153
Added paletted OpenGL texture support.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 06 Aug 2006 23:34:59 +0000 |
parents | 5d3724f64f2b |
children | 8055185ae4ed |
line wrap: on
line diff
--- a/src/SDL_compat.c Sun Aug 06 08:55:37 2006 +0000 +++ b/src/SDL_compat.c Sun Aug 06 23:34:59 2006 +0000 @@ -286,7 +286,13 @@ } } if (userdata == SDL_VideoSurface) { - return SDL_SetDisplayPalette(palette->colors, 0, palette->ncolors); + if (SDL_SetDisplayPalette(palette->colors, 0, palette->ncolors) < 0) { + return -1; + } + if (SDL_SetTexturePalette + (SDL_VideoTexture, palette->colors, 0, palette->ncolors) < 0) { + return -1; + } } return 0; }