aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu
diff options
context:
space:
mode:
authorsnowstormxd <214507868+snowstormxd@users.noreply.github.com>2026-11-02 20:51:10 +0000
committersnowstormxd <214507868+snowstormxd@users.noreply.github.com>2026-11-02 20:51:10 +0000
commitb75ea7bcba60b70349274747cca04549908797bd (patch)
tree4548e69e77326078cf3aab1c325e0ab980935520 /src/yuzu
parent8748e8a9045188ba46656794ee2462988378b598 (diff)
settings: restore the recommended MKW settings prompt
Apply accepted settings visibly and save them, then reapply after per-game configuration. Include handheld mode. Assisted by Codex.
Diffstat (limited to 'src/yuzu')
-rw-r--r--src/yuzu/main_window.cpp30
-rw-r--r--src/yuzu/main_window.h1
2 files changed, 31 insertions, 0 deletions
diff --git a/src/yuzu/main_window.cpp b/src/yuzu/main_window.cpp
index e5a8f81424..d0cd130f6f 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"
@@ -457,6 +458,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, and handheld mode.\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
@@ -1964,6 +1988,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) {
diff --git a/src/yuzu/main_window.h b/src/yuzu/main_window.h
index e2c5a0f6db..6fe967267a 100644
--- a/src/yuzu/main_window.h
+++ b/src/yuzu/main_window.h
@@ -501,6 +501,7 @@ private:
#endif
MultiplayerState* multiplayer_state = nullptr;
+ bool use_recommended_mkw_settings = false;
GRenderWindow* render_window = nullptr;
GameList* game_list = nullptr;