Only remove graphic from palette list if it's 8bit
This commit is contained in:
parent
a3371f7bc5
commit
3f54b2759a
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue