diff --git a/gfx/video_crt_switch.c b/gfx/video_crt_switch.c index 874e5c3afa..3b906fcdf3 100644 --- a/gfx/video_crt_switch.c +++ b/gfx/video_crt_switch.c @@ -55,7 +55,8 @@ static void crt_check_first_run(void) orig_height = GetSystemMetrics(SM_CYSCREEN); orig_width = GetSystemMetrics(SM_CXSCREEN); #endif - first_run = false; + + first_run = false; } static void switch_crt_hz(void) @@ -185,6 +186,11 @@ void crt_switch_res_core(unsigned width, unsigned height, float hz) void crt_video_restore(void) { + if (first_run) + return; + video_display_server_switch_resolution(orig_width, orig_height, 0, 60); + + first_run = true; } diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 9d2a9b6d40..f18fd34b71 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -144,7 +144,6 @@ static void *video_driver_state_buffer = NULL; static unsigned video_driver_state_scale = 0; static unsigned video_driver_state_out_bpp = 0; static bool video_driver_state_out_rgb32 = false; -static bool video_driver_crt_switched = false; static bool video_driver_crt_switching_active = false; static struct retro_system_av_info video_driver_av_info; @@ -1572,12 +1571,7 @@ static void video_driver_lock_new(void) void video_driver_destroy(void) { video_display_server_destroy(); - - if (video_driver_crt_switched) - { - crt_video_restore(); - video_driver_crt_switched = false; - } + crt_video_restore(); video_driver_cb_has_focus = null_driver_has_focus; video_driver_use_rgba = false; @@ -2606,7 +2600,6 @@ void video_driver_frame(const void *data, unsigned width, /* trigger set resolution*/ if (video_info.crt_switch_resolution) { - video_driver_crt_switched = true; video_driver_crt_switching_active = true; if (video_info.crt_switch_resolution_super == 2560)