From 34e55f235ebde37616a8661231f972990b87d6bf Mon Sep 17 00:00:00 2001 From: kub Date: Sat, 10 Oct 2020 20:56:21 +0200 Subject: [PATCH 1/2] add triplebuffering support --- plat_sdl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plat_sdl.c b/plat_sdl.c index 9b78d05..2d38fcc 100644 --- a/plat_sdl.c +++ b/plat_sdl.c @@ -123,7 +123,11 @@ 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) + 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); +#endif if (plat_sdl_screen == NULL) { fprintf(stderr, "SDL_SetVideoMode failed: %s\n", SDL_GetError()); return -1; From 39b2c61e1d4ef370b0f84cb5a601f9f2d3a1d35a Mon Sep 17 00:00:00 2001 From: kub Date: Sat, 10 Oct 2020 20:57:22 +0200 Subject: [PATCH 2/2] fix loading screen if loading rom from command line --- plat_sdl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plat_sdl.c b/plat_sdl.c index 2d38fcc..ab606bb 100644 --- a/plat_sdl.c +++ b/plat_sdl.c @@ -295,6 +295,7 @@ int plat_sdl_init(void) } plat_target.vout_methods = vout_list; + plat_sdl_change_video_mode(g_menuscreen_w, g_menuscreen_h, 1); return 0; fail: