Only remove graphic from palette list if it's 8bit

This commit is contained in:
jsalmon3 2004-03-28 18:02:51 +00:00
parent a3371f7bc5
commit 3f54b2759a

View file

@ -496,7 +496,9 @@ global void ResizeGraphic(Graphic* g, int w, int h)
SDL_UnlockSurface(g->Surface);
memcpy(pal, g->Surface->format->palette->colors, sizeof(SDL_Color) * 256);
VideoPaletteListRemove(g->Surface);
if (graphic->Surface->format->BytesPerPixel == 1) {
VideoPaletteListRemove(g->Surface);
}
ckey = g->Surface->format->colorkey;
SDL_FreeSurface(g->Surface);