add nca verification popup and hides fw20 popup

This commit is contained in:
Maufeat 2025-08-30 12:46:08 +02:00 committed by crueter
parent 55f0b40dc3
commit aea5655bc9
Signed by: crueter
GPG key ID: 425ACD2D4830EBC6
4 changed files with 38 additions and 1 deletions

View file

@ -628,6 +628,8 @@ struct Values {
linkage, "Eden", "device_name", Category::System, Specialization::Default, true, true}; linkage, "Eden", "device_name", Category::System, Specialization::Default, true, true};
SwitchableSetting<bool> disable_nca_verification{linkage, true, "disable_nca_verification", SwitchableSetting<bool> disable_nca_verification{linkage, true, "disable_nca_verification",
Category::System, Specialization::Default}; Category::System, Specialization::Default};
SwitchableSetting<bool> hide_nca_verification_popup{
linkage, false, "hide_nca_verification_popup", Category::System, Specialization::Default};
Setting<s32> current_user{linkage, 0, "current_user", Category::System}; Setting<s32> current_user{linkage, 0, "current_user", Category::System};

View file

@ -414,6 +414,8 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QWidget* parent)
"\nThis may improve loading speed but risks data corruption or invalid files going " "\nThis may improve loading speed but risks data corruption or invalid files going "
"undetected.\n" "undetected.\n"
"Is necessary to make games and updates work that needs firmware 20+.")); "Is necessary to make games and updates work that needs firmware 20+."));
INSERT(Settings, hide_nca_verification_popup, tr("Hide NCA Verification Popup"),
tr("Hides the NCA verifcation warning popup on startup."));
// Controls // Controls

View file

@ -553,6 +553,8 @@ GMainWindow::GMainWindow(bool has_broken_vulkan)
// Gen keys if necessary // Gen keys if necessary
OnCheckFirmwareDecryption(); OnCheckFirmwareDecryption();
OnCheckNcaVerification();
game_list->LoadCompatibilityList(); game_list->LoadCompatibilityList();
// force reload on first load to ensure add-ons get updated // force reload on first load to ensure add-ons get updated
game_list->PopulateAsync(UISettings::values.game_dirs, false); game_list->PopulateAsync(UISettings::values.game_dirs, false);
@ -5265,6 +5267,36 @@ void GMainWindow::OnCheckFirmwareDecryption() {
UpdateMenuState(); UpdateMenuState();
} }
void GMainWindow::OnCheckNcaVerification() {
if (!Settings::values.disable_nca_verification.GetValue())
return;
const bool currently_hidden = Settings::values.hide_nca_verification_popup.GetValue();
LOG_INFO(Frontend, "NCA Verification is disabled. Popup State={}", currently_hidden);
if (currently_hidden)
return;
QMessageBox msgbox(this);
msgbox.setWindowTitle(tr("NCA Verification Disabled"));
msgbox.setText(tr("NCA Verification is now disabled. This feature is required to run new "
"games and updates. Please ensure you are loading trusted NCA files into "
"the emulator, or re-enable verification in Eden's Settings if unsure."));
msgbox.setIcon(QMessageBox::Warning);
msgbox.setStandardButtons(QMessageBox::Ok);
msgbox.setDefaultButton(QMessageBox::Ok);
QCheckBox* cb = new QCheckBox(tr("Don't show this message again"), &msgbox);
cb->setChecked(currently_hidden);
msgbox.setCheckBox(cb);
msgbox.exec();
const bool hide = cb->isChecked();
if (hide != currently_hidden) {
Settings::values.hide_nca_verification_popup.SetValue(hide);
}
}
bool GMainWindow::CheckFirmwarePresence() { bool GMainWindow::CheckFirmwarePresence() {
return FirmwareManager::CheckFirmwarePresence(*system.get()); return FirmwareManager::CheckFirmwarePresence(*system.get());
} }
@ -5285,7 +5317,7 @@ void GMainWindow::SetFirmwareVersion() {
const std::string display_version(firmware_data.display_version.data()); const std::string display_version(firmware_data.display_version.data());
const std::string display_title(firmware_data.display_title.data()); const std::string display_title(firmware_data.display_title.data());
LOG_INFO(Frontend, "Installed firmware: {}", display_title); LOG_INFO(Frontend, "Installed firmware: {}", display_version);
firmware_label->setText(QString::fromStdString(display_version)); firmware_label->setText(QString::fromStdString(display_version));
firmware_label->setToolTip(QString::fromStdString(display_title)); firmware_label->setToolTip(QString::fromStdString(display_title));

View file

@ -424,6 +424,7 @@ private slots:
void OnCreateHomeMenuShortcut(GameListShortcutTarget target); void OnCreateHomeMenuShortcut(GameListShortcutTarget target);
void OnCaptureScreenshot(); void OnCaptureScreenshot();
void OnCheckFirmwareDecryption(); void OnCheckFirmwareDecryption();
void OnCheckNcaVerification();
void OnLanguageChanged(const QString& locale); void OnLanguageChanged(const QString& locale);
void OnMouseActivity(); void OnMouseActivity();
bool OnShutdownBegin(); bool OnShutdownBegin();