Mercurial > sdl-ios-xcode
diff src/video/qnxgf/SDL_gf_pixelfmt.c @ 3185:44d5474c2c8a
Continue working on QNX GF and Photon support.
author | Mike Gorchak <lestat@i.com.ua> |
---|---|
date | Wed, 10 Jun 2009 08:09:04 +0000 |
parents | 7f684f249ec9 |
children | f7b03b6838cb |
line wrap: on
line diff
--- a/src/video/qnxgf/SDL_gf_pixelfmt.c Wed Jun 10 05:56:36 2009 +0000 +++ b/src/video/qnxgf/SDL_gf_pixelfmt.c Wed Jun 10 08:09:04 2009 +0000 @@ -41,8 +41,9 @@ return GF_FORMAT_PACK_ARGB1555; } break; - case SDL_PIXELFORMAT_ABGR1555: + case SDL_PIXELFORMAT_RGB555: { + /* RGB555 is the same as ARGB1555, but alpha is ignored */ return GF_FORMAT_PACK_ARGB1555; } break; @@ -51,18 +52,33 @@ return GF_FORMAT_PACK_RGB565; } break; - case SDL_PIXELFORMAT_RGB888: + case SDL_PIXELFORMAT_BGR565: { + return GF_FORMAT_PKBE_RGB565; + } + break; + case SDL_PIXELFORMAT_RGB24: + { + /* GF has wrong components order */ return GF_FORMAT_BGR888; } break; - case SDL_PIXELFORMAT_BGRA8888: + case SDL_PIXELFORMAT_RGB888: { + /* The same format as ARGB8888, but with alpha ignored */ + /* and GF has wrong components order */ return GF_FORMAT_BGRA8888; } break; case SDL_PIXELFORMAT_ARGB8888: { + /* GF has wrong components order */ + return GF_FORMAT_BGRA8888; + } + break; + case SDL_PIXELFORMAT_BGRA8888: + { + /* GF has wrong components order */ return GF_FORMAT_ARGB8888; } break; @@ -110,14 +126,9 @@ return SDL_PIXELFORMAT_ARGB1555; } break; - case GF_FORMAT_PKBE_ARGB1555: - { - return SDL_PIXELFORMAT_ABGR1555; - } - break; case GF_FORMAT_PKBE_RGB565: { - return SDL_PIXELFORMAT_RGB565; + return SDL_PIXELFORMAT_BGR565; } break; case GF_FORMAT_PKLE_RGB565: @@ -132,20 +143,22 @@ break; case GF_FORMAT_BGR888: { - return SDL_PIXELFORMAT_RGB888; + /* GF has wrong components order */ + return SDL_PIXELFORMAT_RGB24; } break; case GF_FORMAT_BGRA8888: { - return SDL_PIXELFORMAT_BGRA8888; + /* GF has wrong components order */ + return SDL_PIXELFORMAT_ARGB8888; } break; case GF_FORMAT_ARGB8888: { - return SDL_PIXELFORMAT_ARGB8888; + /* GF has wrong components order */ + return SDL_PIXELFORMAT_BGRA8888; } break; - case GF_FORMAT_PLANAR_YUV_YV12: { return SDL_PIXELFORMAT_YV12;