mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-25 12:20:48 +00:00
Don't omit AR changes when not reinitting video in SET_SYSTEM_AV_INFO
This commit is contained in:
parent
c0bc8d2df2
commit
33ab147514
22
retroarch.c
22
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. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user