mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-31 10:36:56 +00:00
[frontend] Firmware setup & requirement (#222)
Currently Android only, will need to be added to desktop. Android incorrectly records firmware as 19.0.1 if on a higher version... TODO: - [x] desktop - [x] fix android Signed-off-by: crueter <swurl@swurl.xyz> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/222 Co-authored-by: crueter <swurl@swurl.xyz> Co-committed-by: crueter <swurl@swurl.xyz>
This commit is contained in:
@@ -462,6 +462,9 @@ GMainWindow::GMainWindow(bool has_broken_vulkan)
|
||||
// Gen keys if necessary
|
||||
OnCheckFirmwareDecryption();
|
||||
|
||||
// Check firmware
|
||||
OnCheckFirmware();
|
||||
|
||||
game_list->LoadCompatibilityList();
|
||||
// force reload on first load to ensure add-ons get updated
|
||||
game_list->PopulateAsync(UISettings::values.game_dirs, false);
|
||||
@@ -4326,6 +4329,7 @@ void GMainWindow::OnInstallFirmware() {
|
||||
|
||||
progress.close();
|
||||
OnCheckFirmwareDecryption();
|
||||
OnCheckFirmware();
|
||||
}
|
||||
|
||||
void GMainWindow::OnInstallDecryptionKeys() {
|
||||
@@ -4404,6 +4408,7 @@ void GMainWindow::OnInstallDecryptionKeys() {
|
||||
}
|
||||
|
||||
OnCheckFirmwareDecryption();
|
||||
OnCheckFirmware();
|
||||
}
|
||||
|
||||
void GMainWindow::OnAbout() {
|
||||
@@ -5067,6 +5072,34 @@ void GMainWindow::OnCheckFirmwareDecryption() {
|
||||
UpdateMenuState();
|
||||
}
|
||||
|
||||
void GMainWindow::OnCheckFirmware()
|
||||
{
|
||||
if (!CheckFirmwarePresence()) {
|
||||
QMessageBox::warning(
|
||||
this, tr("Firmware Missing"),
|
||||
tr("Firmware missing. Firmware is required to run certain games and use the Home Menu.\n"
|
||||
"Eden only works with firmware 19.0.1 and earlier."));
|
||||
} else {
|
||||
Service::Set::FirmwareVersionFormat firmware_data{};
|
||||
const auto result = Service::Set::GetFirmwareVersionImpl(
|
||||
firmware_data, *system, Service::Set::GetFirmwareVersionType::Version2);
|
||||
|
||||
if (result.IsError()) {
|
||||
LOG_INFO(Frontend, "Unable to read firmware");
|
||||
QMessageBox::warning(
|
||||
this, tr("Firmware Corrupted"),
|
||||
tr("Firmware reported as present, but was unable to be read. Check for decryption keys and redump firmware if necessary."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (firmware_data.major > 19) {
|
||||
QMessageBox::warning(
|
||||
this, tr("Firmware Too New"),
|
||||
tr("Firmware is too new. Eden only works with firmware 19.0.1 and earlier."));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool GMainWindow::CheckFirmwarePresence() {
|
||||
constexpr u64 MiiEditId = static_cast<u64>(Service::AM::AppletProgramId::MiiEdit);
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: 2014 Citra Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
@@ -414,6 +417,7 @@ private slots:
|
||||
void OnCreateHomeMenuShortcut(GameListShortcutTarget target);
|
||||
void OnCaptureScreenshot();
|
||||
void OnCheckFirmwareDecryption();
|
||||
void OnCheckFirmware();
|
||||
void OnLanguageChanged(const QString& locale);
|
||||
void OnMouseActivity();
|
||||
bool OnShutdownBegin();
|
||||
|
||||
Reference in New Issue
Block a user