VERY experimental Nintendo Switch 2 emulator
C++
Merge branch 'game-warnings'
swurla8f105d4fffe
diff --cc src/yuzu/main.cppindex 6b18276a6b,5e4aecdeb4..48fbfd6b8e--- a/src/yuzu/main.cpp+++ b/src/yuzu/main.cpp@@@ -1778,6 -1787,53 +1787,56 @@@ bool GMainWindow::LoadROM(const QStringstd::make_unique<QtWebBrowser>(*this), // Web Browser});++ /** Game Updates check */+++ // yuzu's configuration doesn't actually support lists so this is a bit hacky+ QSettings settings;+ QStringList currentIgnored = settings.value("ignoredBadUpdates", {}).toStringList();++ for (const u64 id : bad_update_games) {+ const bool ignored = currentIgnored.contains(QString::number(id));++ if (params.program_id == id && !ignored) {+ QMessageBox *msg = new QMessageBox(this);+ msg->setWindowTitle(tr("Game Updates Warning"));+ msg->setIcon(QMessageBox::Warning);+ msg->setText(tr("The game you are trying to launch is known to have performance or booting "+ "issues when updates are applied. It's recommended to disable any updates "+ "to this game before attempting to launch, or switch to an earlier update. "+ "If you don't have any updates installed or enabled, you can safely ignore "+ "this message.<br><br>Press \"OK\" to continue launching, or \"Cancel\" to "+ "cancel the launch."));++ msg->setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);++ QCheckBox *dontShowAgain = new QCheckBox(msg);+ dontShowAgain->setText(tr("Don't show again for this game"));+ msg->setCheckBox(dontShowAgain);++ int result = msg->exec();++ // wtf+ QMessageBox::ButtonRole role = msg->buttonRole(msg->button((QMessageBox::StandardButton) result));++ switch (role) {++ case QMessageBox::RejectRole:+ return false;++ case QMessageBox::AcceptRole:+ default:+ if (dontShowAgain->isChecked()) {+ currentIgnored << QString::number(params.program_id);++ settings.setValue("ignoredBadUpdates", currentIgnored);+ settings.sync();+ }+ break;+ }+ }+ }+++ /** Exec */const Core::SystemResultStatus result{system->Load(*render_window, filename.toStdString(), params)};@@@ -4649,9 -4705,13 +4708,10 @@@ void GMainWindow::UpdateStatusBar()} else {emu_speed_label->setText(tr("Speed: %1%").arg(results.emulation_speed * 100.0, 0, 'f', 0));}- if (!Settings::values.use_speed_limit) {- game_fps_label->setText(- tr("Game: %1 FPS (Unlocked)").arg(std::round(results.average_game_fps), 0, 'f', 0));- } else {- game_fps_label->setText(- tr("Game: %1 FPS").arg(std::round(results.average_game_fps), 0, 'f', 0));- }+++ game_fps_label->setText(+ tr("Game: %1 FPS").arg(std::round(results.average_game_fps), 0, 'f', 0) + tr(Settings::values.use_speed_limit ? " (Unlocked)" : ""));+emu_frametime_label->setText(tr("Frame: %1 ms").arg(results.frametime * 1000.0, 0, 'f', 2));res_scale_label->setVisible(true);