A few fixes:

Fixed creating render texture framebuffer.
Removed the need for palette watch, added surface format caching.
Added an SDL_DONTFREE flag so you can't free the window and 1.2 shadow surfaces.
This commit is contained in:
Sam Lantinga 2011-02-13 13:46:10 -08:00
parent 13ba84bf0e
commit 5095592ce5
15 changed files with 250 additions and 314 deletions

View file

@ -437,17 +437,15 @@ SDL_SaveBMP_RW(SDL_Surface * saveme, SDL_RWops * dst, int freedst)
/* If the surface has a colorkey or alpha channel we'll save a
32-bit BMP with alpha channel, otherwise save a 24-bit BMP. */
if (save32bit) {
SDL_InitFormat(&format, 32,
0x00FF0000, 0x0000FF00, 0x000000FF,
0xFF000000);
} else {
SDL_InitFormat(&format, 24,
SDL_InitFormat(&format,
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
0x00FF0000, 0x0000FF00, 0x000000FF,
SDL_PIXELFORMAT_ARGB8888
#else
0x000000FF, 0x0000FF00, 0x00FF0000,
SDL_PIXELFORMAT_BGRA8888
#endif
0);
);
} else {
SDL_InitFormat(&format, SDL_PIXELFORMAT_BGR24);
}
surface = SDL_ConvertSurface(saveme, &format, 0);
if (!surface) {