Navigation Menu

Skip to content

Commit

Permalink
Fixed bug 4229 - Add support for ABGR format in DirectFB renderer
Browse files Browse the repository at this point in the history
Alexandre

DirectFB supports 32-bit ABGR pixel format via DSPF_ABGR, but SDL doesn't map SDL_PIXELFORMAT_ABGR8888 to DSPF_ABGR.

A patch is attached and should add support for ABGR pixel format devices.
  • Loading branch information
slouken committed Aug 28, 2018
1 parent 87bc1fb commit 404ba5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/directfb/SDL_DirectFB_video.c
Expand Up @@ -324,6 +324,7 @@ static const struct {
{ DSPF_YUY2, SDL_PIXELFORMAT_YUY2 }, /* 16 bit YUV (4 byte/ 2 pixel, macropixel contains CbYCrY [31:0]) */
{ DSPF_UYVY, SDL_PIXELFORMAT_UYVY }, /* 16 bit YUV (4 byte/ 2 pixel, macropixel contains YCbYCr [31:0]) */
{ DSPF_RGB555, SDL_PIXELFORMAT_RGB555 }, /* 16 bit RGB (2 byte, nothing @15, red 5@10, green 5@5, blue 5@0) */
{ DSPF_ABGR, SDL_PIXELFORMAT_ABGR8888 }, /* 32 bit ABGR (4 byte, alpha 8@24, blue 8@16, green 8@8, red 8@0) */
#if (ENABLE_LUT8)
{ DSPF_LUT8, SDL_PIXELFORMAT_INDEX8 }, /* 8 bit LUT (8 bit color and alpha lookup from palette) */
#endif
Expand Down Expand Up @@ -370,7 +371,6 @@ static const struct {
{ DSPF_UNKNOWN, SDL_PIXELFORMAT_BGR24 },
{ DSPF_UNKNOWN, SDL_PIXELFORMAT_BGR888 },
{ DSPF_UNKNOWN, SDL_PIXELFORMAT_RGBA8888 },
{ DSPF_UNKNOWN, SDL_PIXELFORMAT_ABGR8888 },
{ DSPF_UNKNOWN, SDL_PIXELFORMAT_BGRA8888 },
{ DSPF_UNKNOWN, SDL_PIXELFORMAT_ARGB2101010 },
{ DSPF_UNKNOWN, SDL_PIXELFORMAT_ABGR4444 },
Expand Down

0 comments on commit 404ba5e

Please sign in to comment.