summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2024-01-28 21:02:15 +0100
committerGitHub <noreply@github.com>2024-01-28 21:02:15 +0100
commite687ca87356eb8a09d0a7f274bb6544802fa242f (patch)
tree75dd743e12e0f6b9ca46fdb274c5c8a38b7f4376
parentMerge pull request #12826 from t895/system-driver-version (diff)
parentconfigure_graphics: Avoid crash when vsync_mode_combobox is empty (occurs when renderer backend is Null) (diff)
downloadyuzu-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.cpp5
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);