Added paletted OpenGL texture support.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402021
This commit is contained in:
Sam Lantinga 2006-08-06 23:34:59 +00:00
parent 1c97a53526
commit e16c932a5c
2 changed files with 88 additions and 4 deletions

View file

@ -286,7 +286,13 @@ SDL_VideoPaletteChanged(void *userdata, SDL_Palette * palette)
}
}
if (userdata == SDL_VideoSurface) {
return SDL_SetDisplayPalette(palette->colors, 0, palette->ncolors);
if (SDL_SetDisplayPalette(palette->colors, 0, palette->ncolors) < 0) {
return -1;
}
if (SDL_SetTexturePalette
(SDL_VideoTexture, palette->colors, 0, palette->ncolors) < 0) {
return -1;
}
}
return 0;
}