# HG changeset patch # User Sam Lantinga # Date 1285576242 25200 # Node ID deadc1219bea59dd38b051c2745d4a68ecbec2ae # Parent 69d9db65f248bd690d14d4d1a17e0a9bfa0bf988 Minor cleanup in patches from Coursoud diff -r 69d9db65f248 -r deadc1219bea src/SDL_compat.c --- 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; diff -r 69d9db65f248 -r deadc1219bea src/video/SDL_video.c --- a/src/video/SDL_video.c Mon Sep 27 01:24:05 2010 -0700 +++ b/src/video/SDL_video.c Mon Sep 27 01:30:42 2010 -0700 @@ -1467,7 +1467,7 @@ SDL_GL_UnloadLibrary(); } - /* Now invalidate magic */ + /* Now invalidate magic */ window->magic = NULL; /* Unlink the window from the list */