From 226bc87f4c37ea78774b3f4944ab546e6d015b40 Mon Sep 17 00:00:00 2001 From: Dimitris Panokostas Date: Thu, 28 Dec 2017 16:19:40 +0100 Subject: [PATCH] Always set next_synctime to zero (both SDL1 and SDL2) when opening a screen --- src/osdep/amiberry_gfx.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/osdep/amiberry_gfx.cpp b/src/osdep/amiberry_gfx.cpp index f470bd3d..5617c771 100644 --- a/src/osdep/amiberry_gfx.cpp +++ b/src/osdep/amiberry_gfx.cpp @@ -386,9 +386,9 @@ static void open_screen(struct uae_prefs* p) max_uae_width = 1920; max_uae_height = 1080; } - -#ifdef USE_SDL1 + next_synctime = 0; +#ifdef USE_SDL1 current_resource_amigafb = 0; currprefs.gfx_correct_aspect = changed_prefs.gfx_correct_aspect; currprefs.gfx_fullscreen_ratio = changed_prefs.gfx_fullscreen_ratio; @@ -929,9 +929,7 @@ bool vsync_switchmode(int hz) if (hz != currVSyncRate) { currVSyncRate = hz; -#ifdef USE_SDL1 black_screen_now(); -#endif fpscounter_reset(); time_per_frame = 1000 * 1000 / (hz); @@ -961,9 +959,7 @@ bool target_graphics_buffer_update() if (rate_changed) { -#ifdef USE_SDL1 black_screen_now(); -#endif fpscounter_reset(); time_per_frame = 1000 * 1000 / currprefs.chipset_refreshrate; }