Mercurial > sdl-ios-xcode
diff 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 |
line wrap: on
line diff
--- a/src/SDL_compat.c Mon Sep 27 01:24:05 2010 -0700 +++ b/src/SDL_compat.c Mon Sep 27 01:30:42 2010 -0700 @@ -320,12 +320,9 @@ } } if (userdata == SDL_VideoSurface) { - if (SDL_SetDisplayPalette(palette->colors, 0, palette->ncolors) < 0) { - /* The display surface not necessarily needs to have a palette. - * Just do nothing here and try to set the texture palette. - */ - //return -1; - } + /* The display may not have a palette, but always set texture palette */ + SDL_SetDisplayPalette(palette->colors, 0, palette->ncolors); + if (SDL_SetTexturePalette (SDL_VideoTexture, palette->colors, 0, palette->ncolors) < 0) { return -1;