Fixed loading 8-bit BMP exported by Gimp with RGB masks
parent
1e50823a14
commit
33d025d35a
|
@ -309,14 +309,13 @@ Uint32 SDL_GetPixelFormatEnumForMasks(int bpp, Uint32 Rmask, Uint32 Gmask, Uint3
|
|||
/* SDL defaults to MSB ordering */
|
||||
return SDL_PIXELFORMAT_INDEX4MSB;
|
||||
case 8:
|
||||
if (Rmask == 0) {
|
||||
return SDL_PIXELFORMAT_INDEX8;
|
||||
}
|
||||
if (Rmask == 0xE0 &&
|
||||
Gmask == 0x1C &&
|
||||
Bmask == 0x03 &&
|
||||
Amask == 0x00) {
|
||||
return SDL_PIXELFORMAT_RGB332;
|
||||
} else {
|
||||
return SDL_PIXELFORMAT_INDEX8;
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
|
|
Loading…
Reference in New Issue