src/video/SDL_pixels.c
changeset 3484 fed6d4c6c693
parent 3284 2b95b2c0b6d4
child 3555 7549b986ccb1
equal deleted inserted replaced
3483:a54df8e52333 3484:fed6d4c6c693
   101         masks[1] = 0x003FF000;
   101         masks[1] = 0x003FF000;
   102         masks[2] = 0x00000FFC;
   102         masks[2] = 0x00000FFC;
   103         masks[3] = 0x00000003;
   103         masks[3] = 0x00000003;
   104         break;
   104         break;
   105     default:
   105     default:
   106         /* Unknown layout */
   106         SDL_SetError("Unknown pixel format");
   107         return SDL_FALSE;
   107         return SDL_FALSE;
   108     }
   108     }
   109 
   109 
   110     switch (SDL_PIXELORDER(format)) {
   110     switch (SDL_PIXELORDER(format)) {
   111     case SDL_PACKEDORDER_XRGB:
   111     case SDL_PACKEDORDER_XRGB:
   151         *Bmask = masks[1];
   151         *Bmask = masks[1];
   152         *Gmask = masks[2];
   152         *Gmask = masks[2];
   153         *Rmask = masks[3];
   153         *Rmask = masks[3];
   154         break;
   154         break;
   155     default:
   155     default:
   156         /* Unknown order */
   156         SDL_SetError("Unknown pixel format");
   157         return SDL_FALSE;
   157         return SDL_FALSE;
   158     }
   158     }
   159     return SDL_TRUE;
   159     return SDL_TRUE;
   160 }
   160 }
   161 
   161