Minor cleanup in patches from Coursoud

This commit is contained in:
Sam Lantinga 2010-09-27 01:30:42 -07:00
parent 45e68f6c5c
commit 51b19abe02
2 changed files with 4 additions and 7 deletions

View file

@ -320,12 +320,9 @@ SDL_VideoPaletteChanged(void *userdata, SDL_Palette * palette)
} }
} }
if (userdata == SDL_VideoSurface) { if (userdata == SDL_VideoSurface) {
if (SDL_SetDisplayPalette(palette->colors, 0, palette->ncolors) < 0) { /* The display may not have a palette, but always set texture palette */
/* The display surface not necessarily needs to have a palette. SDL_SetDisplayPalette(palette->colors, 0, palette->ncolors);
* Just do nothing here and try to set the texture palette.
*/
//return -1;
}
if (SDL_SetTexturePalette if (SDL_SetTexturePalette
(SDL_VideoTexture, palette->colors, 0, palette->ncolors) < 0) { (SDL_VideoTexture, palette->colors, 0, palette->ncolors) < 0) {
return -1; return -1;

View file

@ -1467,7 +1467,7 @@ SDL_DestroyWindow(SDL_Window * window)
SDL_GL_UnloadLibrary(); SDL_GL_UnloadLibrary();
} }
/* Now invalidate magic */ /* Now invalidate magic */
window->magic = NULL; window->magic = NULL;
/* Unlink the window from the list */ /* Unlink the window from the list */