Fixed bug #912
SDL_MasksToPixelFormatEnum() wasn't correctly returning RGB24 formats --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404347
This commit is contained in:
parent
6da163ab81
commit
87672bbcfa
1 changed files with 10 additions and 2 deletions
|
@ -239,9 +239,17 @@ SDL_MasksToPixelFormatEnum(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask,
|
||||||
case 24:
|
case 24:
|
||||||
switch (Rmask) {
|
switch (Rmask) {
|
||||||
case 0x00FF0000:
|
case 0x00FF0000:
|
||||||
return SDL_PIXELFORMAT_RGB888;
|
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
|
||||||
|
return SDL_PIXELFORMAT_RGB24;
|
||||||
|
#else
|
||||||
|
return SDL_PIXELFORMAT_BGR24;
|
||||||
|
#endif
|
||||||
case 0x000000FF:
|
case 0x000000FF:
|
||||||
return SDL_PIXELFORMAT_BGR888;
|
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
|
||||||
|
return SDL_PIXELFORMAT_BGR24;
|
||||||
|
#else
|
||||||
|
return SDL_PIXELFORMAT_RGB24;
|
||||||
|
#endif
|
||||||
case 0x00000000:
|
case 0x00000000:
|
||||||
/* FIXME: At this point we can't distinguish */
|
/* FIXME: At this point we can't distinguish */
|
||||||
/* if this format is RGB24 or BGR24 */
|
/* if this format is RGB24 or BGR24 */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue