mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 22:57:22 +00:00
yuzu-qt: Use Null when OpenGL is not compiled
This commit is contained in:
parent
e4ebabcd5b
commit
d8943e5bac
1 changed files with 9 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue