| Summary: | invalidate surface->map in SDL_SurfacePalette() | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Wei Mingzhi <weimingzhi> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.3 | ||
| Hardware: | All | ||
| OS: | All | ||
|
Description
Wei Mingzhi
2014-07-05 18:33:20 UTC
just a note: I'm currently using a hack like this as I don't think there is a public API to invalidate surface->map: SDL_SetSurfacePalette(gpScreen, palette); SDL_SetSurfacePalette(gpScreenBak, palette); // // HACKHACK: need to invalidate gpScreen->map otherwise the palette // would not be effective during blit // SDL_SetSurfaceColorMod(gpScreen, 0, 0, 0); SDL_SetSurfaceColorMod(gpScreen, 0xFF, 0xFF, 0xFF); SDL_SetSurfaceColorMod(gpScreenBak, 0, 0, 0); SDL_SetSurfaceColorMod(gpScreenBak, 0xFF, 0xFF, 0xFF); This should be fixed, thanks! https://hg.libsdl.org/SDL/rev/7e3f54f2b16f |