Fixed updating the video surface when the palette changes
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403315
This commit is contained in:
parent
cc01f2a867
commit
6096d0f8e1
1 changed files with 3 additions and 1 deletions
|
@ -638,7 +638,7 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags)
|
||||||
SDL_DitherColors(SDL_VideoSurface->format->palette->colors,
|
SDL_DitherColors(SDL_VideoSurface->format->palette->colors,
|
||||||
SDL_VideoSurface->format->BitsPerPixel);
|
SDL_VideoSurface->format->BitsPerPixel);
|
||||||
SDL_AddPaletteWatch(SDL_VideoSurface->format->palette,
|
SDL_AddPaletteWatch(SDL_VideoSurface->format->palette,
|
||||||
SDL_VideoPaletteChanged, NULL);
|
SDL_VideoPaletteChanged, SDL_VideoSurface);
|
||||||
SDL_SetPaletteColors(SDL_VideoSurface->format->palette,
|
SDL_SetPaletteColors(SDL_VideoSurface->format->palette,
|
||||||
SDL_VideoSurface->format->palette->colors, 0,
|
SDL_VideoSurface->format->palette->colors, 0,
|
||||||
SDL_VideoSurface->format->palette->ncolors);
|
SDL_VideoSurface->format->palette->ncolors);
|
||||||
|
@ -664,6 +664,8 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags)
|
||||||
SDL_DitherColors(SDL_ShadowSurface->format->palette->colors,
|
SDL_DitherColors(SDL_ShadowSurface->format->palette->colors,
|
||||||
SDL_ShadowSurface->format->BitsPerPixel);
|
SDL_ShadowSurface->format->BitsPerPixel);
|
||||||
}
|
}
|
||||||
|
SDL_AddPaletteWatch(SDL_ShadowSurface->format->palette,
|
||||||
|
SDL_VideoPaletteChanged, SDL_ShadowSurface);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SDL_PublicSurface =
|
SDL_PublicSurface =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue