aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas <104419015+jojo-chaechae@users.noreply.github.com>2026-11-03 05:27:10 +0600
committerGitHub <noreply@github.com>2026-11-03 05:27:10 +0600
commit0f9760e5ccfd336130f194c2564849052acde591 (patch)
treedbbc3303c9a7c2c90508256aca102e36b332b209
parent59718ed0820132176ead0ebcb29e5b6a0cf93e4f (diff)
parente996661b99f4102f35e2aea596a67646afb127b0 (diff)
Merge pull request #354 from Djihads80/fix/mkw-prompt-on-boot
qt: ask about the recommended MKW settings only when booting MKW
-rw-r--r--src/yuzu/main_window.cpp37
-rw-r--r--src/yuzu/main_window.h1
2 files changed, 15 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();
diff --git a/src/yuzu/main_window.h b/src/yuzu/main_window.h
index d6b0e5b312..1bd04a4d8b 100644
--- a/src/yuzu/main_window.h
+++ b/src/yuzu/main_window.h
@@ -504,6 +504,7 @@ private:
MultiplayerState* multiplayer_state = nullptr;
bool use_recommended_mkw_settings = false;
+ bool asked_recommended_mkw_settings = false;
GRenderWindow* render_window = nullptr;
GameList* game_list = nullptr;