Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed updating the video surface when the palette changes
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 7, 2008
1 parent 59d361b commit b9309d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/SDL_compat.c
Expand Up @@ -638,7 +638,7 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags)
SDL_DitherColors(SDL_VideoSurface->format->palette->colors,
SDL_VideoSurface->format->BitsPerPixel);
SDL_AddPaletteWatch(SDL_VideoSurface->format->palette,
SDL_VideoPaletteChanged, NULL);
SDL_VideoPaletteChanged, SDL_VideoSurface);
SDL_SetPaletteColors(SDL_VideoSurface->format->palette,
SDL_VideoSurface->format->palette->colors, 0,
SDL_VideoSurface->format->palette->ncolors);
Expand All @@ -664,6 +664,8 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags)
SDL_DitherColors(SDL_ShadowSurface->format->palette->colors,
SDL_ShadowSurface->format->BitsPerPixel);
}
SDL_AddPaletteWatch(SDL_ShadowSurface->format->palette,
SDL_VideoPaletteChanged, SDL_ShadowSurface);
}
}
SDL_PublicSurface =
Expand Down

0 comments on commit b9309d2

Please sign in to comment.