diff options
| author | Jonas <104419015+jojo-chaechae@users.noreply.github.com> | 2026-11-03 04:36:01 +0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-03 04:36:01 +0600 |
| commit | 8362c44ff835d7be73d2adad9ce3e2d4467a6aeb (patch) | |
| tree | c1eb12a54510bbeaed67a8a524b5ce9e8576cfcd /src/yuzu/main_window.cpp | |
| parent | 155bf34fc297b6b8e4c281ecf7ea5d9ce3140762 (diff) | |
| parent | fe3c344573140b7864c9a86f204eb9c0dce0d548 (diff) | |
Merge pull request #334 from snowstormxd/codex/upstream-mkw-test
MKW performance improvements
Diffstat (limited to 'src/yuzu/main_window.cpp')
| -rw-r--r-- | src/yuzu/main_window.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/yuzu/main_window.cpp b/src/yuzu/main_window.cpp index 02b36cf9cf..8fa39e07e3 100644 --- a/src/yuzu/main_window.cpp +++ b/src/yuzu/main_window.cpp @@ -10,6 +10,7 @@ #include <boost/algorithm/string/split.hpp> #include "common/fs/path_util.h" +#include "common/game_presets.h" #include "common/settings.h" #include "common/settings_enums.h" #include "frontend_common/settings_generator.h" @@ -458,6 +459,29 @@ MainWindow::MainWindow(bool has_broken_vulkan) // Gen keys if necessary OnCheckFirmwareDecryption(false); + auto* recommendations = new QMessageBox( + QMessageBox::Question, tr("Recommended Mario Kart World settings"), + tr("Use the recommended settings for Mario Kart World?\n\n" + "Vulkan, 1x resolution, GPU Fast, asynchronous shaders, BC3, conservative VRAM, " + "reactive flushing off, FIFO Relaxed VSync, handheld mode, ScaleForce, and FXAA.\n\n" + "Yes replaces your saved settings. No or closing this window keeps your settings."), + QMessageBox::Yes | QMessageBox::No, this); + recommendations->setAttribute(Qt::WA_DeleteOnClose); + recommendations->setDefaultButton(QMessageBox::No); + recommendations->setEscapeButton(QMessageBox::No); + recommendations->setWindowModality(Qt::NonModal); + connect(recommendations, &QMessageBox::finished, this, [this](int result) { + use_recommended_mkw_settings = result == QMessageBox::Yes; + if (use_recommended_mkw_settings && !emulation_running && !boot_in_progress) { + Settings::SetMarioKartWorldRecommendedSettings(Settings::values, true); + config->SaveAllValues(); + QtCommon::system->ApplySettings(); + UpdateStatusButtons(); + } + LOG_INFO(Config, "MKW recommended settings accepted: {}", use_recommended_mkw_settings); + }); + recommendations->show(); + #ifdef __unix__ OnCheckGraphicsBackend(); #endif @@ -1965,6 +1989,12 @@ void MainWindow::BootGame(const QString& filename, Service::AM::FrontendAppletPa QtCommon::system->ApplySettings(); } + if (Settings::ApplyMarioKartWorldPreset(Settings::values, title_id, + use_recommended_mkw_settings)) { + QtCommon::system->ApplySettings(); + Settings::UpdateGPUAccuracy(); + LOG_INFO(Config, "Applied recommended MKW settings after per-game configuration"); + } Settings::LogSettings(); if (UISettings::values.select_user_on_boot && !user_flag_cmd_line) { |
