Mercurial > sdl-ios-xcode
comparison src/SDL_compat.c @ 4901:deadc1219bea
Minor cleanup in patches from Coursoud
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 27 Sep 2010 01:30:42 -0700 |
parents | d72e28642940 |
children | da347bfed240 |
comparison
equal
deleted
inserted
replaced
4900:69d9db65f248 | 4901:deadc1219bea |
---|---|
318 if (!SDL_VideoSurface->format->palette) { | 318 if (!SDL_VideoSurface->format->palette) { |
319 SDL_UpdateRect(SDL_ShadowSurface, 0, 0, 0, 0); | 319 SDL_UpdateRect(SDL_ShadowSurface, 0, 0, 0, 0); |
320 } | 320 } |
321 } | 321 } |
322 if (userdata == SDL_VideoSurface) { | 322 if (userdata == SDL_VideoSurface) { |
323 if (SDL_SetDisplayPalette(palette->colors, 0, palette->ncolors) < 0) { | 323 /* The display may not have a palette, but always set texture palette */ |
324 /* The display surface not necessarily needs to have a palette. | 324 SDL_SetDisplayPalette(palette->colors, 0, palette->ncolors); |
325 * Just do nothing here and try to set the texture palette. | 325 |
326 */ | |
327 //return -1; | |
328 } | |
329 if (SDL_SetTexturePalette | 326 if (SDL_SetTexturePalette |
330 (SDL_VideoTexture, palette->colors, 0, palette->ncolors) < 0) { | 327 (SDL_VideoTexture, palette->colors, 0, palette->ncolors) < 0) { |
331 return -1; | 328 return -1; |
332 } | 329 } |
333 } | 330 } |