diff options
author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-09-05 23:59:44 +0200 |
---|---|---|
committer | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-09-05 23:59:44 +0200 |
commit | d8943e5bac380bbf49e1064aa30a9ec6b8f9be91 (patch) | |
tree | 093e16ddc819572b7c067dd74d29e7dca512888b /src | |
parent | yuzu-qt: Update API Text for broken Vulkan (diff) | |
download | yuzu-d8943e5bac380bbf49e1064aa30a9ec6b8f9be91.tar yuzu-d8943e5bac380bbf49e1064aa30a9ec6b8f9be91.tar.gz yuzu-d8943e5bac380bbf49e1064aa30a9ec6b8f9be91.tar.bz2 yuzu-d8943e5bac380bbf49e1064aa30a9ec6b8f9be91.tar.lz yuzu-d8943e5bac380bbf49e1064aa30a9ec6b8f9be91.tar.xz yuzu-d8943e5bac380bbf49e1064aa30a9ec6b8f9be91.tar.zst yuzu-d8943e5bac380bbf49e1064aa30a9ec6b8f9be91.zip |
Diffstat (limited to '')
-rw-r--r-- | src/yuzu/main.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 91c7797cf..5262769bb 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -442,7 +442,11 @@ GMainWindow::GMainWindow(std::unique_ptr<Config> config_, bool has_broken_vulkan "#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>" "here for instructions to fix the issue</a>.")); +#ifdef HAS_OPENGL Settings::values.renderer_backend = Settings::RendererBackend::OpenGL; +#else + Settings::values.renderer_backend = Settings::RendererBackend::Null; +#endif UpdateAPIText(); renderer_status_button->setDisabled(true); @@ -3771,10 +3775,14 @@ void GMainWindow::OnToggleAdaptingFilter() { void GMainWindow::OnToggleGraphicsAPI() { auto api = Settings::values.renderer_backend.GetValue(); - if (api == Settings::RendererBackend::OpenGL) { + if (api != Settings::RendererBackend::Vulkan) { api = Settings::RendererBackend::Vulkan; } else { +#ifdef HAS_OPENGL api = Settings::RendererBackend::OpenGL; +#else + api = Settings::RendererBackend::Null; +#endif } Settings::values.renderer_backend.SetValue(api); renderer_status_button->setChecked(api == Settings::RendererBackend::Vulkan); |