Skip to content

Commit

Permalink
Ignore SDL_PHYSPAL if not setting it on an 8-bit screen surface.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed May 27, 2021
1 parent 0042f2c commit 8792c2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SDL12_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -4253,8 +4253,8 @@ SDL_SetPalette(SDL12_Surface *surface12, int flags, const SDL_Color *colors,
retval = -1;
}
}
if (flags & SDL12_PHYSPAL) {

if ((flags & SDL12_PHYSPAL) && (surface12 == VideoSurface12) && VideoPhysicalPalette20) {
if (SDL20_SetPaletteColors(VideoPhysicalPalette20, opaquecolors, firstcolor, ncolors) < 0) {
retval = -1;
}
Expand Down

0 comments on commit 8792c2f

Please sign in to comment.