Always set next_synctime to zero (both SDL1 and SDL2) when opening a screen

This commit is contained in:
Dimitris Panokostas 2017-12-28 16:19:40 +01:00
parent 2f8f163351
commit 226bc87f4c

View file

@ -387,8 +387,8 @@ static void open_screen(struct uae_prefs* p)
max_uae_height = 1080; max_uae_height = 1080;
} }
#ifdef USE_SDL1
next_synctime = 0; next_synctime = 0;
#ifdef USE_SDL1
current_resource_amigafb = 0; current_resource_amigafb = 0;
currprefs.gfx_correct_aspect = changed_prefs.gfx_correct_aspect; currprefs.gfx_correct_aspect = changed_prefs.gfx_correct_aspect;
currprefs.gfx_fullscreen_ratio = changed_prefs.gfx_fullscreen_ratio; currprefs.gfx_fullscreen_ratio = changed_prefs.gfx_fullscreen_ratio;
@ -929,9 +929,7 @@ bool vsync_switchmode(int hz)
if (hz != currVSyncRate) if (hz != currVSyncRate)
{ {
currVSyncRate = hz; currVSyncRate = hz;
#ifdef USE_SDL1
black_screen_now(); black_screen_now();
#endif
fpscounter_reset(); fpscounter_reset();
time_per_frame = 1000 * 1000 / (hz); time_per_frame = 1000 * 1000 / (hz);
@ -961,9 +959,7 @@ bool target_graphics_buffer_update()
if (rate_changed) if (rate_changed)
{ {
#ifdef USE_SDL1
black_screen_now(); black_screen_now();
#endif
fpscounter_reset(); fpscounter_reset();
time_per_frame = 1000 * 1000 / currprefs.chipset_refreshrate; time_per_frame = 1000 * 1000 / currprefs.chipset_refreshrate;
} }