src/video/SDL_pixels.c
changeset 6074 3e1323cbb807
parent 5535 96594ac5fd1a
child 6138 4c64952a58fb
equal deleted inserted replaced
6073:9738f2a8eee4 6074:3e1323cbb807
   107     CASE(SDL_PIXELFORMAT_RGB565)
   107     CASE(SDL_PIXELFORMAT_RGB565)
   108     CASE(SDL_PIXELFORMAT_BGR565)
   108     CASE(SDL_PIXELFORMAT_BGR565)
   109     CASE(SDL_PIXELFORMAT_RGB24)
   109     CASE(SDL_PIXELFORMAT_RGB24)
   110     CASE(SDL_PIXELFORMAT_BGR24)
   110     CASE(SDL_PIXELFORMAT_BGR24)
   111     CASE(SDL_PIXELFORMAT_RGB888)
   111     CASE(SDL_PIXELFORMAT_RGB888)
       
   112     CASE(SDL_PIXELFORMAT_RGBX8888)
   112     CASE(SDL_PIXELFORMAT_BGR888)
   113     CASE(SDL_PIXELFORMAT_BGR888)
       
   114     CASE(SDL_PIXELFORMAT_BGRX8888)
   113     CASE(SDL_PIXELFORMAT_ARGB8888)
   115     CASE(SDL_PIXELFORMAT_ARGB8888)
   114     CASE(SDL_PIXELFORMAT_RGBA8888)
   116     CASE(SDL_PIXELFORMAT_RGBA8888)
   115     CASE(SDL_PIXELFORMAT_ABGR8888)
   117     CASE(SDL_PIXELFORMAT_ABGR8888)
   116     CASE(SDL_PIXELFORMAT_BGRA8888)
   118     CASE(SDL_PIXELFORMAT_BGRA8888)
   117     CASE(SDL_PIXELFORMAT_ARGB2101010)
   119     CASE(SDL_PIXELFORMAT_ARGB2101010)
   424             Gmask == 0x0000FF00 &&
   426             Gmask == 0x0000FF00 &&
   425             Bmask == 0x000000FF &&
   427             Bmask == 0x000000FF &&
   426             Amask == 0x00000000) {
   428             Amask == 0x00000000) {
   427             return SDL_PIXELFORMAT_RGB888;
   429             return SDL_PIXELFORMAT_RGB888;
   428         }
   430         }
       
   431         if (Rmask == 0xFF000000 &&
       
   432             Gmask == 0x00FF0000 &&
       
   433             Bmask == 0x0000FF00 &&
       
   434             Amask == 0x00000000) {
       
   435             return SDL_PIXELFORMAT_RGBX8888;
       
   436         }
   429         if (Rmask == 0x000000FF &&
   437         if (Rmask == 0x000000FF &&
   430             Gmask == 0x0000FF00 &&
   438             Gmask == 0x0000FF00 &&
   431             Bmask == 0x00FF0000 &&
   439             Bmask == 0x00FF0000 &&
   432             Amask == 0x00000000) {
   440             Amask == 0x00000000) {
   433             return SDL_PIXELFORMAT_BGR888;
   441             return SDL_PIXELFORMAT_BGR888;
       
   442         }
       
   443         if (Rmask == 0x0000FF00 &&
       
   444             Gmask == 0x00FF0000 &&
       
   445             Bmask == 0xFF000000 &&
       
   446             Amask == 0x00000000) {
       
   447             return SDL_PIXELFORMAT_BGRX8888;
   434         }
   448         }
   435         if (Rmask == 0x00FF0000 &&
   449         if (Rmask == 0x00FF0000 &&
   436             Gmask == 0x0000FF00 &&
   450             Gmask == 0x0000FF00 &&
   437             Bmask == 0x000000FF &&
   451             Bmask == 0x000000FF &&
   438             Amask == 0xFF000000) {
   452             Amask == 0xFF000000) {