Mercurial > sdl-ios-xcode
diff src/video/SDL_bmp.c @ 2967:e4a469d6ddab
Implemented SDL_SetWindowIcon(), with translucent icon support under X11.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 02 Jan 2009 17:39:48 +0000 |
parents | cdb01906cb7e |
children | 1ee69e7e7cea |
line wrap: on
line diff
--- a/src/video/SDL_bmp.c Fri Jan 02 16:38:31 2009 +0000 +++ b/src/video/SDL_bmp.c Fri Jan 02 17:39:48 2009 +0000 @@ -397,22 +397,19 @@ ) { surface = saveme; } else { - SDL_PixelFormat *format; + SDL_PixelFormat format; /* Convert to 24 bits per pixel */ - format = SDL_AllocFormat(24, + SDL_InitFormat(&format, 24, #if SDL_BYTEORDER == SDL_LIL_ENDIAN - 0x00FF0000, 0x0000FF00, 0x000000FF, + 0x00FF0000, 0x0000FF00, 0x000000FF, #else - 0x000000FF, 0x0000FF00, 0x00FF0000, + 0x000000FF, 0x0000FF00, 0x00FF0000, #endif - 0); - if (format != NULL) { - surface = SDL_ConvertSurface(saveme, format, 0); - if (!surface) { - SDL_SetError("Couldn't convert image to 24 bpp"); - } - SDL_FreeFormat(format); + 0); + surface = SDL_ConvertSurface(saveme, &format, 0); + if (!surface) { + SDL_SetError("Couldn't convert image to 24 bpp"); } } }