Mercurial > sdl-ios-xcode
changeset 4901:deadc1219bea
Minor cleanup in patches from Coursoud
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 27 Sep 2010 01:30:42 -0700 |
parents | 69d9db65f248 |
children | 50d0bff24d81 |
files | src/SDL_compat.c src/video/SDL_video.c |
diffstat | 2 files changed, 4 insertions(+), 7 deletions(-) [+] |
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;