mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 06:25:46 +00:00
configure_graphics: Avoid crash when vsync_mode_combobox is empty (occurs when renderer backend is Null)
This commit is contained in:
parent
d013206aa4
commit
d225bdd14b
1 changed files with 5 additions and 0 deletions
|
@ -224,6 +224,11 @@ void ConfigureGraphics::PopulateVSyncModeSelection(bool use_setting) {
|
|||
}
|
||||
|
||||
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 vsync_mode = PresentModeToSetting(mode);
|
||||
Settings::values.vsync_mode.SetValue(vsync_mode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue