Closed carstene1ns closed 4 years ago
untested patch:
diff --git a/src/sdl2_ui.cpp b/src/sdl2_ui.cpp
index a2fb09b8..761c57a0 100644
--- a/src/sdl2_ui.cpp
+++ b/src/sdl2_ui.cpp
@@ -59,6 +59,20 @@ AudioInterface& Sdl2Ui::GetAudio() {
}
#endif
+#if ! SDL_VERSION_ATLEAST(2,0,5)
+ #if SDL_BYTEORDER == SDL_BIG_ENDIAN
+ #define SDL_PIXELFORMAT_RGBA32 SDL_PIXELFORMAT_RGBA8888
+ #define SDL_PIXELFORMAT_ARGB32 SDL_PIXELFORMAT_ARGB8888
+ #define SDL_PIXELFORMAT_BGRA32 SDL_PIXELFORMAT_BGRA8888
+ #define SDL_PIXELFORMAT_ABGR32 SDL_PIXELFORMAT_ABGR8888
+ #else
+ #define SDL_PIXELFORMAT_RGBA32 SDL_PIXELFORMAT_ABGR8888
+ #define SDL_PIXELFORMAT_ARGB32 SDL_PIXELFORMAT_BGRA8888
+ #define SDL_PIXELFORMAT_BGRA32 SDL_PIXELFORMAT_ARGB8888
+ #define SDL_PIXELFORMAT_ABGR32 SDL_PIXELFORMAT_RGBA8888
+ #endif
+#endif
+
static uint32_t GetDefaultFormat() {
return SDL_PIXELFORMAT_RGBA32;
}
has: 2.0.2 (should be ours) needs: 2.0.5
Stretch has 2.0.5 already, but ours is used Xenial has 2.0.4, update needed.
Might patch this out or upgrade sdl2, if possible.