Libretro: Fixed aspect ratio issue when switching back to "Auto" region

This commit is contained in:
Sour 2018-01-12 17:58:24 -05:00
parent 507cb32a44
commit 935afb0ba3

View File

@ -616,8 +616,6 @@ extern "C" {
_soundManager->SetSkipMode(false);
}
Console::GetInstance()->RunSingleFrame();
bool updated = false;
if(retroEnv(RETRO_ENVIRONMENT_GET_VARIABLE_UPDATE, &updated) && updated) {
update_settings();
@ -629,6 +627,15 @@ extern "C" {
_hdPacksEnabled = hdPacksEnabled;
}
}
Console::GetInstance()->RunSingleFrame();
if(updated) {
//Update geometry after running the frame, in case the console's region changed (affects "auto" aspect ratio)
retro_system_av_info avInfo = {};
_renderer->GetSystemAudioVideoInfo(avInfo);
retroEnv(RETRO_ENVIRONMENT_SET_GEOMETRY, &avInfo);
}
}
RETRO_API size_t retro_serialize_size()