mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-21 18:17:02 +02:00
[fs] temporarely disable nca verification (#298)
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: https://git.eden-emu.dev/eden-emu/eden/pulls/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:
parent
b4b361e5e9
commit
6045627462
61 changed files with 559 additions and 129 deletions
|
|
@ -17,15 +17,16 @@
|
|||
#include "yuzu/applets/qt_web_browser_scripts.h"
|
||||
#endif
|
||||
|
||||
#include "yuzu/applets/qt_web_browser.h"
|
||||
#include "yuzu/main.h"
|
||||
|
||||
#ifdef YUZU_USE_QT_WEB_ENGINE
|
||||
|
||||
#include "common/fs/path_util.h"
|
||||
#include "core/core.h"
|
||||
#include "input_common/drivers/keyboard.h"
|
||||
#include "yuzu/applets/qt_web_browser.h"
|
||||
#include "yuzu/main.h"
|
||||
#include "yuzu/util/url_request_interceptor.h"
|
||||
|
||||
#ifdef YUZU_USE_QT_WEB_ENGINE
|
||||
|
||||
namespace {
|
||||
|
||||
constexpr int HIDButtonToKey(Core::HID::NpadButton button) {
|
||||
|
|
|
|||
|
|
@ -409,6 +409,12 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QWidget* parent)
|
|||
"their resolution, details and supported controllers and depending on this setting.\n"
|
||||
"Setting to Handheld can help improve performance for low end systems."));
|
||||
INSERT(Settings, current_user, QString(), QString());
|
||||
INSERT(Settings, disable_nca_verification, tr("Disable NCA Verification"),
|
||||
tr("Disables integrity verification of NCA content archives."
|
||||
"\nThis may improve loading speed but risks data corruption or invalid files going "
|
||||
"undetected.\n"
|
||||
"Is necessary to make games and updates work that needs firmware 20+."));
|
||||
INSERT(Settings, hide_nca_verification_popup, QString(), QString());
|
||||
|
||||
// Controls
|
||||
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -485,6 +485,9 @@ private:
|
|||
const std::filesystem::path& command, const std::string& arguments,
|
||||
const std::string& categories, const std::string& keywords,
|
||||
const std::string& name);
|
||||
|
||||
bool OnCheckNcaVerification();
|
||||
|
||||
/**
|
||||
* Mimic the behavior of QMessageBox::question but link controller navigation to the dialog
|
||||
* The only difference is that it returns a boolean.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue