mirror of
https://github.com/yawut/SDL.git
synced 2026-09-07 08:36:19 -05:00
Fixed bug #912
SDL_MasksToPixelFormatEnum() wasn't correctly returning RGB24 formats
This commit is contained in:
@@ -239,9 +239,17 @@ SDL_MasksToPixelFormatEnum(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask,
|
||||
case 24:
|
||||
switch (Rmask) {
|
||||
case 0x00FF0000:
|
||||
return SDL_PIXELFORMAT_RGB888;
|
||||
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
|
||||
return SDL_PIXELFORMAT_RGB24;
|
||||
#else
|
||||
return SDL_PIXELFORMAT_BGR24;
|
||||
#endif
|
||||
case 0x000000FF:
|
||||
return SDL_PIXELFORMAT_BGR888;
|
||||
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
|
||||
return SDL_PIXELFORMAT_BGR24;
|
||||
#else
|
||||
return SDL_PIXELFORMAT_RGB24;
|
||||
#endif
|
||||
case 0x00000000:
|
||||
/* FIXME: At this point we can't distinguish */
|
||||
/* if this format is RGB24 or BGR24 */
|
||||
|
||||
Reference in New Issue
Block a user