Mercurial > sdl-ios-xcode
comparison 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 |
comparison
equal
deleted
inserted
replaced
1973:81255f93dfcd | 1974:70deaf574153 |
---|---|
284 if (!SDL_VideoSurface->format->palette) { | 284 if (!SDL_VideoSurface->format->palette) { |
285 SDL_UpdateRect(SDL_ShadowSurface, 0, 0, 0, 0); | 285 SDL_UpdateRect(SDL_ShadowSurface, 0, 0, 0, 0); |
286 } | 286 } |
287 } | 287 } |
288 if (userdata == SDL_VideoSurface) { | 288 if (userdata == SDL_VideoSurface) { |
289 return SDL_SetDisplayPalette(palette->colors, 0, palette->ncolors); | 289 if (SDL_SetDisplayPalette(palette->colors, 0, palette->ncolors) < 0) { |
290 return -1; | |
291 } | |
292 if (SDL_SetTexturePalette | |
293 (SDL_VideoTexture, palette->colors, 0, palette->ncolors) < 0) { | |
294 return -1; | |
295 } | |
290 } | 296 } |
291 return 0; | 297 return 0; |
292 } | 298 } |
293 | 299 |
294 static void | 300 static void |