We explicitly don't know how to handle 1 and 4 bpp pixel formats.

This commit is contained in:
Sam Lantinga
2011-03-07 00:08:23 -08:00
parent 581f9824ef
commit 1279ca64b1

View File

@@ -241,6 +241,10 @@ SDL_MasksToPixelFormatEnum(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask,
Uint32 Amask)
{
switch (bpp) {
case 1:
case 4:
/* Can't tell if this is LSB or MSB bitmap ordering... */
break;
case 8:
if (Rmask == 0) {
return SDL_PIXELFORMAT_INDEX8;