From 2de059caceed8e552c53343304b954650f6ab4aa Mon Sep 17 00:00:00 2001 From: kub Date: Mon, 22 Mar 2021 23:04:12 +0100 Subject: [PATCH] add SDL SWSURFACE support --- plat_sdl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plat_sdl.c b/plat_sdl.c index 6510fc1..6a86d1d 100644 --- a/plat_sdl.c +++ b/plat_sdl.c @@ -123,7 +123,9 @@ int plat_sdl_change_video_mode(int w, int h, int force) if (plat_target.vout_method == 0) { SDL_PumpEvents(); -#if defined(SDL_TRIPLEBUF) && defined(SDL_BUFFER_3X) +#if defined SDL_SURFACE_SW + plat_sdl_screen = SDL_SetVideoMode(w, h, 16, SDL_SWSURFACE); +#elif defined(SDL_TRIPLEBUF) && defined(SDL_BUFFER_3X) plat_sdl_screen = SDL_SetVideoMode(w, h, 16, SDL_HWSURFACE | SDL_TRIPLEBUF); #else plat_sdl_screen = SDL_SetVideoMode(w, h, 16, SDL_HWSURFACE | SDL_DOUBLEBUF); -- 2.39.2