Offer to install the disc's firmware updater from the game context menu

The game screen already reports which updater a disc carries, but there was no
way to act on it - the only route to installing one was picking an updater PBP
out of the browser. The unpacker already handles being pointed at a disc, so
this just wires the menu entry to it.

Shown only when the disc actually has one, and not while a game is running:
installing wipes the NAND that game has mounted.

InstallUpdateScreen takes the archive size now, because for a disc the size of
the file it was handed is the game's and says nothing about the firmware.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Henrik Rydgård
2026-09-09 16:25:13 -06:00
co-authored by Claude Opus 5
parent 63eb3d5b21
commit 29c5d1baf1
3 changed files with 23 additions and 6 deletions
+3 -2
View File
@@ -36,12 +36,13 @@
#include "UI/MiscViews.h"
#include "UI/EmuScreen.h"
InstallUpdateScreen::InstallUpdateScreen(const Path &path, std::string_view title, bool allowRun)
InstallUpdateScreen::InstallUpdateScreen(const Path &path, std::string_view title, bool allowRun, u64 archiveSize)
: UISimpleBaseDialogScreen(Path(), SimpleDialogFlags::ContentsCanScroll), path_(path), title_(title), allowRun_(allowRun) {
destination_ = GetSysDirectory(DIRECTORY_NAND);
fileSize_ = archiveSize;
File::FileInfo fileInfo;
if (File::GetFileInfo(path_, &fileInfo)) {
if (fileSize_ == 0 && File::GetFileInfo(path_, &fileInfo)) {
fileSize_ = fileInfo.size;
}
// There's no practical way to merge two firmwares, so an install replaces whatever is there.