aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/main_window.cpp
diff options
context:
space:
mode:
authorcirakg <cirakg@cirakg.xyz>2026-11-03 00:03:26 +0100
committercirakg <cirakg@cirakg.xyz>2026-11-03 00:03:26 +0100
commit844ebf0b09c3a8d9641ff095e4287b3d493181dc (patch)
tree7ed9270c599984b5f8299303ce0daf3e5cde4971 /src/yuzu/main_window.cpp
parentb504f4e82bb0b675d953d14b67e307eac58226d3 (diff)
parent8362c44ff835d7be73d2adad9ce3e2d4467a6aeb (diff)
Merge upstream Djihads80/Eglantine nx2 into fix/nsp-switch2-detection
Diffstat (limited to 'src/yuzu/main_window.cpp')
-rw-r--r--src/yuzu/main_window.cpp30
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) {