src/video/SDL_pixels.c
changeset 6074 3e1323cbb807
parent 5535 96594ac5fd1a
child 6138 4c64952a58fb
     1.1 --- a/src/video/SDL_pixels.c	Wed Nov 09 02:35:49 2011 -0500
     1.2 +++ b/src/video/SDL_pixels.c	Wed Nov 09 22:53:44 2011 -0500
     1.3 @@ -109,7 +109,9 @@
     1.4      CASE(SDL_PIXELFORMAT_RGB24)
     1.5      CASE(SDL_PIXELFORMAT_BGR24)
     1.6      CASE(SDL_PIXELFORMAT_RGB888)
     1.7 +    CASE(SDL_PIXELFORMAT_RGBX8888)
     1.8      CASE(SDL_PIXELFORMAT_BGR888)
     1.9 +    CASE(SDL_PIXELFORMAT_BGRX8888)
    1.10      CASE(SDL_PIXELFORMAT_ARGB8888)
    1.11      CASE(SDL_PIXELFORMAT_RGBA8888)
    1.12      CASE(SDL_PIXELFORMAT_ABGR8888)
    1.13 @@ -426,12 +428,24 @@
    1.14              Amask == 0x00000000) {
    1.15              return SDL_PIXELFORMAT_RGB888;
    1.16          }
    1.17 +        if (Rmask == 0xFF000000 &&
    1.18 +            Gmask == 0x00FF0000 &&
    1.19 +            Bmask == 0x0000FF00 &&
    1.20 +            Amask == 0x00000000) {
    1.21 +            return SDL_PIXELFORMAT_RGBX8888;
    1.22 +        }
    1.23          if (Rmask == 0x000000FF &&
    1.24              Gmask == 0x0000FF00 &&
    1.25              Bmask == 0x00FF0000 &&
    1.26              Amask == 0x00000000) {
    1.27              return SDL_PIXELFORMAT_BGR888;
    1.28          }
    1.29 +        if (Rmask == 0x0000FF00 &&
    1.30 +            Gmask == 0x00FF0000 &&
    1.31 +            Bmask == 0xFF000000 &&
    1.32 +            Amask == 0x00000000) {
    1.33 +            return SDL_PIXELFORMAT_BGRX8888;
    1.34 +        }
    1.35          if (Rmask == 0x00FF0000 &&
    1.36              Gmask == 0x0000FF00 &&
    1.37              Bmask == 0x000000FF &&