[fs] temporarely disable nca verification (#298)
Some checks failed
eden-license / license-header (pull_request) Failing after 25s

This adds a passthrough to basically disable nca verification for newer NCAs, this fixes (tested) Pokemon 4.0.0 update and other newer SDK games and updates (as reported on the discord)

This is implemented as toggle that is default enabled, this needs proper implementation in the future.

Co-authored-by: crueter <crueter@eden-emu.dev>
Reviewed-on: #298
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: Maufeat <sahyno1996@gmail.com>
Co-committed-by: Maufeat <sahyno1996@gmail.com>
This commit is contained in:
Maufeat 2025-09-05 00:04:37 +02:00 committed by crueter
parent bbcd8aded6
commit 718891d11f
Signed by: crueter
GPG key ID: 425ACD2D4830EBC6
61 changed files with 559 additions and 129 deletions

View file

@ -2036,6 +2036,10 @@ bool GMainWindow::LoadROM(const QString& filename, Service::AM::FrontendAppletPa
}
}
if (!OnCheckNcaVerification()) {
return false;
}
/** Exec */
const Core::SystemResultStatus result{
system->Load(*render_window, filename.toStdString(), params)};
@ -5265,6 +5269,41 @@ void GMainWindow::OnCheckFirmwareDecryption() {
UpdateMenuState();
}
bool GMainWindow::OnCheckNcaVerification() {
if (!Settings::values.disable_nca_verification.GetValue())
return true;
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 true;
QMessageBox msgbox(this);
msgbox.setWindowTitle(tr("NCA Verification Disabled"));
msgbox.setText(tr("NCA Verification is disabled.\n"
"This is required to run new games and updates.\n"
"Running without verification can cause instability or crashes if NCA files "
"are corrupt, modified, or tampered.\n"
"If unsure, re-enable verification in Eden's Settings and use firmware "
"version 19.0.1 or below."));
msgbox.setIcon(QMessageBox::Warning);
msgbox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
msgbox.setDefaultButton(QMessageBox::Ok);
QCheckBox* cb = new QCheckBox(tr("Don't show again"), &msgbox);
cb->setChecked(currently_hidden);
msgbox.setCheckBox(cb);
int result = msgbox.exec();
const bool hide = cb->isChecked();
if (hide != currently_hidden) {
Settings::values.hide_nca_verification_popup.SetValue(hide);
}
return result == static_cast<int>(QMessageBox::Ok);
}
bool GMainWindow::CheckFirmwarePresence() {
return FirmwareManager::CheckFirmwarePresence(*system.get());
}
@ -5285,7 +5324,7 @@ void GMainWindow::SetFirmwareVersion() {
const std::string display_version(firmware_data.display_version.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->setToolTip(QString::fromStdString(display_title));