mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-28 14:50:05 +00:00
configure_graphics: Avoid crash when vsync_mode_combobox is empty (occurs when renderer backend is Null)
This commit is contained in:
parent
b4a8e1ef8a
commit
0bf46cb1ee
@ -224,6 +224,11 @@ void ConfigureGraphics::PopulateVSyncModeSelection(bool use_setting) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ConfigureGraphics::UpdateVsyncSetting() const {
|
void ConfigureGraphics::UpdateVsyncSetting() const {
|
||||||
|
const Settings::RendererBackend backend{GetCurrentGraphicsBackend()};
|
||||||
|
if (backend == Settings::RendererBackend::Null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const auto mode = vsync_mode_combobox_enum_map[vsync_mode_combobox->currentIndex()];
|
const auto mode = vsync_mode_combobox_enum_map[vsync_mode_combobox->currentIndex()];
|
||||||
const auto vsync_mode = PresentModeToSetting(mode);
|
const auto vsync_mode = PresentModeToSetting(mode);
|
||||||
Settings::values.vsync_mode.SetValue(vsync_mode);
|
Settings::values.vsync_mode.SetValue(vsync_mode);
|
||||||
|
Loading…
Reference in New Issue
Block a user