Commit 4309e332 authored by Sam Lantinga's avatar Sam Lantinga

Fixed compatibility with SDL 1.2 pixel format (24 bits per pixel of color data...

Fixed compatibility with SDL 1.2 pixel format (24 bits per pixel of color data with 4 bytes per pixel == 32 bpp)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403834
parent 4b968e37
......@@ -39,10 +39,10 @@ SDL_PixelFormatEnumToMasks(Uint32 format, int *bpp, Uint32 * Rmask,
Uint32 masks[4];
/* Initialize the values here */
if (SDL_BYTESPERPIXEL(format) == 3) {
*bpp = SDL_BYTESPERPIXEL(format) * 8;
} else {
if (SDL_BYTESPERPIXEL(format) <= 2) {
*bpp = SDL_BITSPERPIXEL(format);
} else {
*bpp = SDL_BYTESPERPIXEL(format) * 8;
}
*Rmask = *Gmask = *Bmask = *Amask = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment