Skip to content

Commit

Permalink
Add more endian-specific aliases for 32 bit pixelformats
Browse files Browse the repository at this point in the history
Add these for all the RGBX variants, just like all the RGBA variants already have.
  • Loading branch information
Starbuck5 authored and slouken committed Jul 26, 2023
1 parent 4749df0 commit 666f81b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/SDL3/SDL_pixels.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,19 @@ typedef enum
SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888,
SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888,
SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888,
SDL_PIXELFORMAT_RGBX32 = SDL_PIXELFORMAT_RGBX8888,
SDL_PIXELFORMAT_XRGB32 = SDL_PIXELFORMAT_XRGB8888,
SDL_PIXELFORMAT_BGRX32 = SDL_PIXELFORMAT_BGRX8888,
SDL_PIXELFORMAT_XBGR32 = SDL_PIXELFORMAT_XBGR8888,
#else
SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888,
SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888,
SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888,
SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888,
SDL_PIXELFORMAT_RGBX32 = SDL_PIXELFORMAT_XBGR8888,
SDL_PIXELFORMAT_XRGB32 = SDL_PIXELFORMAT_BGRX8888,
SDL_PIXELFORMAT_BGRX32 = SDL_PIXELFORMAT_XRGB8888,
SDL_PIXELFORMAT_XBGR32 = SDL_PIXELFORMAT_RGBX8888,
#endif

SDL_PIXELFORMAT_YV12 = /**< Planar mode: Y + V + U (3 planes) */
Expand Down

0 comments on commit 666f81b

Please sign in to comment.