mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-08-25 02:47:18 +02:00
yuzu-qt: Use Null when OpenGL is not compiled
This commit is contained in:
parent
e4ebabcd5b
commit
d8943e5bac
@ -442,7 +442,11 @@ GMainWindow::GMainWindow(std::unique_ptr<Config> config_, bool has_broken_vulkan
|
|||||||
"#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>"
|
"#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>"
|
||||||
"here for instructions to fix the issue</a>."));
|
"here for instructions to fix the issue</a>."));
|
||||||
|
|
||||||
|
#ifdef HAS_OPENGL
|
||||||
Settings::values.renderer_backend = Settings::RendererBackend::OpenGL;
|
Settings::values.renderer_backend = Settings::RendererBackend::OpenGL;
|
||||||
|
#else
|
||||||
|
Settings::values.renderer_backend = Settings::RendererBackend::Null;
|
||||||
|
#endif
|
||||||
|
|
||||||
UpdateAPIText();
|
UpdateAPIText();
|
||||||
renderer_status_button->setDisabled(true);
|
renderer_status_button->setDisabled(true);
|
||||||
@ -3771,10 +3775,14 @@ void GMainWindow::OnToggleAdaptingFilter() {
|
|||||||
|
|
||||||
void GMainWindow::OnToggleGraphicsAPI() {
|
void GMainWindow::OnToggleGraphicsAPI() {
|
||||||
auto api = Settings::values.renderer_backend.GetValue();
|
auto api = Settings::values.renderer_backend.GetValue();
|
||||||
if (api == Settings::RendererBackend::OpenGL) {
|
if (api != Settings::RendererBackend::Vulkan) {
|
||||||
api = Settings::RendererBackend::Vulkan;
|
api = Settings::RendererBackend::Vulkan;
|
||||||
} else {
|
} else {
|
||||||
|
#ifdef HAS_OPENGL
|
||||||
api = Settings::RendererBackend::OpenGL;
|
api = Settings::RendererBackend::OpenGL;
|
||||||
|
#else
|
||||||
|
api = Settings::RendererBackend::Null;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
Settings::values.renderer_backend.SetValue(api);
|
Settings::values.renderer_backend.SetValue(api);
|
||||||
renderer_status_button->setChecked(api == Settings::RendererBackend::Vulkan);
|
renderer_status_button->setChecked(api == Settings::RendererBackend::Vulkan);
|
||||||
|
Loading…
Reference in New Issue
Block a user