aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/main_window.cpp
diff options
context:
space:
mode:
authorJonas <baguettegamerofficial2020@gmail.com>2026-11-03 04:56:47 +0600
committerJonas <baguettegamerofficial2020@gmail.com>2026-11-03 05:26:58 +0600
commite996661b99f4102f35e2aea596a67646afb127b0 (patch)
treedbbc3303c9a7c2c90508256aca102e36b332b209 /src/yuzu/main_window.cpp
parent59718ed0820132176ead0ebcb29e5b6a0cf93e4f (diff)
qt: ask about the recommended MKW settings only when booting MKW
The prompt showed at every startup whatever game was launched, and Yes overwrote the global settings for every title. Ask on the first MKW boot of a session instead and apply the preset to that session only.
Diffstat (limited to 'src/yuzu/main_window.cpp')
-rw-r--r--src/yuzu/main_window.cpp37
1 files changed, 14 insertions, 23 deletions
diff --git a/src/yuzu/main_window.cpp b/src/yuzu/main_window.cpp
index 8fa39e07e3..dbe5ea2334 100644
--- a/src/yuzu/main_window.cpp
+++ b/src/yuzu/main_window.cpp
@@ -459,29 +459,6 @@ 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
@@ -1989,6 +1966,20 @@ void MainWindow::BootGame(const QString& filename, Service::AM::FrontendAppletPa
QtCommon::system->ApplySettings();
}
+ if (title_id == Settings::MarioKartWorldProgramId && !asked_recommended_mkw_settings) {
+ asked_recommended_mkw_settings = true;
+ use_recommended_mkw_settings =
+ QMessageBox::question(
+ this, 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"
+ "They apply to Mario Kart World until Eglantine is closed. Your saved settings "
+ "are not changed."),
+ QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes;
+ LOG_INFO(Config, "MKW recommended settings accepted: {}", use_recommended_mkw_settings);
+ }
if (Settings::ApplyMarioKartWorldPreset(Settings::values, title_id,
use_recommended_mkw_settings)) {
QtCommon::system->ApplySettings();