Merge pull request #8393 from lat9nq/default-vulkan

general: Set renderer_backend's default to Vulkan
This commit is contained in:
bunnei 2022-06-11 00:06:59 -07:00 committed by GitHub
commit ae83d5c6d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 184 additions and 48 deletions

View file

@ -115,6 +115,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual
#include "video_core/shader_notify.h"
#include "yuzu/about_dialog.h"
#include "yuzu/bootmanager.h"
#include "yuzu/check_vulkan.h"
#include "yuzu/compatdb.h"
#include "yuzu/compatibility_list.h"
#include "yuzu/configuration/config.h"
@ -322,6 +323,23 @@ GMainWindow::GMainWindow()
MigrateConfigFiles();
if (!CheckVulkan()) {
config->Save();
QMessageBox::warning(
this, tr("Broken Vulkan Installation Detected"),
tr("Vulkan initialization failed on the previous boot.<br><br>Click <a "
"href='https://yuzu-emu.org/wiki/faq/"
"#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for "
"instructions to fix the issue</a>."));
}
if (UISettings::values.has_broken_vulkan) {
Settings::values.renderer_backend = Settings::RendererBackend::OpenGL;
renderer_status_button->setDisabled(true);
renderer_status_button->setChecked(false);
}
#if defined(HAVE_SDL2) && !defined(_WIN32)
SDL_InitSubSystem(SDL_INIT_VIDEO);
// SDL disables the screen saver by default, and setting the hint
@ -1591,7 +1609,7 @@ void GMainWindow::ShutdownGame() {
emu_speed_label->setVisible(false);
game_fps_label->setVisible(false);
emu_frametime_label->setVisible(false);
renderer_status_button->setEnabled(true);
renderer_status_button->setEnabled(!UISettings::values.has_broken_vulkan);
game_path.clear();
@ -2801,6 +2819,10 @@ void GMainWindow::OnConfigure() {
mouse_hide_timer.start();
}
if (!UISettings::values.has_broken_vulkan) {
renderer_status_button->setEnabled(!emulation_running);
}
UpdateStatusButtons();
controller_dialog->refreshConfiguration();
}