Fixed bug 1224 - Blit map not updated if source palette changed

bastien.bouclet@gmail.com 2011-06-12 11:08:58 PDT

SDL_LowerBlit doesn't update the blit color map if the source surface has
changed.

A proposed fix is attached, storing the source palette version in the color
map.
This commit is contained in:
Sam Lantinga 2012-01-07 01:28:06 -05:00
parent f6bf85902d
commit 0108ce2260
3 changed files with 15 additions and 5 deletions

View file

@ -494,7 +494,9 @@ SDL_LowerBlit(SDL_Surface * src, SDL_Rect * srcrect,
/* Check to make sure the blit mapping is valid */
if ((src->map->dst != dst) ||
(dst->format->palette &&
src->map->palette_version != dst->format->palette->version)) {
src->map->dst_palette_version != dst->format->palette->version) ||
(src->format->palette &&
src->map->src_palette_version != src->format->palette->version)) {
if (SDL_MapSurface(src, dst) < 0) {
return (-1);
}