src/video/SDL_bmp.c
changeset 5288 d4381f3b0d1e
parent 5262 b530ef003506
child 5535 96594ac5fd1a
     1.1 --- a/src/video/SDL_bmp.c	Sun Feb 13 01:31:07 2011 -0800
     1.2 +++ b/src/video/SDL_bmp.c	Sun Feb 13 13:46:10 2011 -0800
     1.3 @@ -437,17 +437,15 @@
     1.4              /* If the surface has a colorkey or alpha channel we'll save a
     1.5                 32-bit BMP with alpha channel, otherwise save a 24-bit BMP. */
     1.6              if (save32bit) {
     1.7 -                SDL_InitFormat(&format, 32,
     1.8 -                               0x00FF0000, 0x0000FF00, 0x000000FF,
     1.9 -                               0xFF000000);
    1.10 +                SDL_InitFormat(&format, 
    1.11 +#if SDL_BYTEORDER == SDL_LIL_ENDIAN
    1.12 +                               SDL_PIXELFORMAT_ARGB8888
    1.13 +#else
    1.14 +                               SDL_PIXELFORMAT_BGRA8888
    1.15 +#endif
    1.16 +                               );
    1.17              } else {
    1.18 -                SDL_InitFormat(&format, 24,
    1.19 -#if SDL_BYTEORDER == SDL_LIL_ENDIAN
    1.20 -                               0x00FF0000, 0x0000FF00, 0x000000FF,
    1.21 -#else
    1.22 -                               0x000000FF, 0x0000FF00, 0x00FF0000,
    1.23 -#endif
    1.24 -                               0);
    1.25 +                SDL_InitFormat(&format, SDL_PIXELFORMAT_BGR24);
    1.26              }
    1.27              surface = SDL_ConvertSurface(saveme, &format, 0);
    1.28              if (!surface) {