diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2024-01-28 21:02:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-28 21:02:15 +0100 |
commit | e687ca87356eb8a09d0a7f274bb6544802fa242f (patch) | |
tree | 75dd743e12e0f6b9ca46fdb274c5c8a38b7f4376 | |
parent | Merge pull request #12826 from t895/system-driver-version (diff) | |
parent | configure_graphics: Avoid crash when vsync_mode_combobox is empty (occurs when renderer backend is Null) (diff) | |
download | yuzu-e687ca87356eb8a09d0a7f274bb6544802fa242f.tar yuzu-e687ca87356eb8a09d0a7f274bb6544802fa242f.tar.gz yuzu-e687ca87356eb8a09d0a7f274bb6544802fa242f.tar.bz2 yuzu-e687ca87356eb8a09d0a7f274bb6544802fa242f.tar.lz yuzu-e687ca87356eb8a09d0a7f274bb6544802fa242f.tar.xz yuzu-e687ca87356eb8a09d0a7f274bb6544802fa242f.tar.zst yuzu-e687ca87356eb8a09d0a7f274bb6544802fa242f.zip |
-rw-r--r-- | src/yuzu/configuration/configure_graphics.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/yuzu/configuration/configure_graphics.cpp b/src/yuzu/configuration/configure_graphics.cpp index 0836bcb7e..54c931e56 100644 --- a/src/yuzu/configuration/configure_graphics.cpp +++ b/src/yuzu/configuration/configure_graphics.cpp @@ -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); |