Skip to content

Commit 9f18827

Browse files
committed
Restore compatibility with older SDL2 versions
1 parent 02803e8 commit 9f18827

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/IMG_webp.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@
3636

3737
#include "SDL_endian.h"
3838

39+
#if !SDL_VERSION_ATLEAST(2,30,0)
40+
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
41+
#define SDL_PIXELFORMAT_RGBX32 SDL_PIXELFORMAT_RGBX8888
42+
#else
43+
#define SDL_PIXELFORMAT_RGBX32 SDL_PIXELFORMAT_XBGR8888
44+
#endif
45+
#endif
46+
3947
#ifdef macintosh
4048
#define MACOS
4149
#endif

0 commit comments

Comments
 (0)