Commit 51b19abe authored by Sam Lantinga's avatar Sam Lantinga

Minor cleanup in patches from Coursoud

parent 45e68f6c
......@@ -320,12 +320,9 @@ SDL_VideoPaletteChanged(void *userdata, SDL_Palette * palette)
}
}
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment