diff --git a/src/sdl-instead/graphics.c b/src/sdl-instead/graphics.c index 3e69a5b..6d02dfc 100644 --- a/src/sdl-instead/graphics.c +++ b/src/sdl-instead/graphics.c @@ -573,9 +573,17 @@ static img_t _gfx_load_image(char *filename) } img = IMG_Load(filename); if (!img) { - return NULL; } + if (img->format->BitsPerPixel == 32) { /* hack for 32 bit BMP :( */ + SDL_RWops *rwop; + rwop = SDL_RWFromFile(filename, "rb"); + if (rwop) { + if (IMG_isBMP(rwop)) + SDL_SetAlpha(img, SDL_RLEACCEL, SDL_ALPHA_OPAQUE); + SDL_FreeRW(rwop); + } + } return img; }