diff options
| author | cirakg <cirakg@cirakg.xyz> | 2026-11-03 00:31:11 +0100 |
|---|---|---|
| committer | cirakg <cirakg@cirakg.xyz> | 2026-11-03 00:31:11 +0100 |
| commit | c85a2c2d021e5337cf27ebd91a0f1e3d9f628de3 (patch) | |
| tree | 7e48118157f01fcb2d6540985570ae5df67a3ea8 /src/yuzu/main_window.cpp | |
| parent | 172aeaa0449d5618cff5753073a5c1741d619689 (diff) | |
| parent | 0f9760e5ccfd336130f194c2564849052acde591 (diff) | |
Merge upstream Djihads80/Eglantine nx2 into nx2
Diffstat (limited to 'src/yuzu/main_window.cpp')
| -rw-r--r-- | src/yuzu/main_window.cpp | 37 |
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(); |
