From a52db8bc85e3a0848653f1b93a5f1c9310bd8ca4 Mon Sep 17 00:00:00 2001 From: Denis Pauk Date: Sun, 2 Sep 2018 08:55:44 +0300 Subject: [PATCH] support for lower version of SDL --- src/client/refresh/soft/sw_main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/refresh/soft/sw_main.c b/src/client/refresh/soft/sw_main.c index 43b7a333..5a50691d 100644 --- a/src/client/refresh/soft/sw_main.c +++ b/src/client/refresh/soft/sw_main.c @@ -1643,7 +1643,11 @@ RE_InitContext(void *win) SDL_RenderPresent(renderer); texture = SDL_CreateTexture(renderer, - SDL_PIXELFORMAT_BGRA32, +#if SDL_BYTEORDER == SDL_BIG_ENDIAN + SDL_PIXELFORMAT_BGRA8888, +#else + SDL_PIXELFORMAT_ARGB8888, +#endif SDL_TEXTUREACCESS_STREAMING, vid.width, vid.height);