diff --git a/retroarch.c b/retroarch.c index fc24a1e179..30d7c3410e 100644 --- a/retroarch.c +++ b/retroarch.c @@ -9595,21 +9595,23 @@ static bool rarch_environment_cb(unsigned cmd, void *data) if (info && av_info) { settings_t *settings = configuration_settings; - int reinit_flags = DRIVERS_CMD_ALL; + const bool no_video_reinit = + settings->uints.crt_switch_resolution == 0 && data + && (*info)->geometry.max_width == av_info->geometry.max_width + && (*info)->geometry.max_height == av_info->geometry.max_height; + /* When not doing video reinit, we also must not do input and menu + * reinit, otherwise the input driver crashes and the menu gets + * corrupted. */ + int reinit_flags = no_video_reinit ? + DRIVERS_CMD_ALL & ~(DRIVER_VIDEO_MASK | DRIVER_INPUT_MASK | DRIVER_MENU_MASK) + : DRIVERS_CMD_ALL; RARCH_LOG("[Environ]: SET_SYSTEM_AV_INFO.\n"); - if (settings->uints.crt_switch_resolution == 0 && data - && (*info)->geometry.max_width == av_info->geometry.max_width - && (*info)->geometry.max_height == av_info->geometry.max_height) - { - /* When not doing video reinit, we also must not do input and - * menu reinit, otherwise the input driver crashes and the menu - * gets corrupted. */ - reinit_flags &= ~(DRIVER_VIDEO_MASK | DRIVER_INPUT_MASK | DRIVER_MENU_MASK); - } memcpy(av_info, *info, sizeof(*av_info)); command_event(CMD_EVENT_REINIT, &reinit_flags); + if (no_video_reinit) + video_driver_set_aspect_ratio(); /* Cannot continue recording with different parameters. * Take the easiest route out and just restart the recording. */