diff --git a/externals/xbyak b/externals/xbyak index a1ac3750f9..9c0f5d3ecb 160000 --- a/externals/xbyak +++ b/externals/xbyak @@ -1 +1 @@ -Subproject commit a1ac3750f9a639b5a6c6d6c7da4259b8d6790989 +Subproject commit 9c0f5d3ecb06d2c93c2b59becb9b3b763213e74e diff --git a/src/suyu/configuration/configure_per_game.cpp b/src/suyu/configuration/configure_per_game.cpp index 2cadba72ff..98d881fea6 100644 --- a/src/suyu/configuration/configure_per_game.cpp +++ b/src/suyu/configuration/configure_per_game.cpp @@ -17,14 +17,17 @@ #include #include "common/fs/fs_util.h" +#include "common/hex_util.h" #include "common/settings_enums.h" #include "common/settings_input.h" #include "configuration/shared_widget.h" #include "core/core.h" #include "core/file_sys/control_metadata.h" +#include "core/file_sys/ips_layer.h" #include "core/file_sys/patch_manager.h" #include "core/file_sys/xts_archive.h" #include "core/loader/loader.h" +#include "core/loader/nso.h" #include "frontend_common/config.h" #include "suyu/configuration/configuration_shared.h" #include "suyu/configuration/configure_audio.h" @@ -44,8 +47,8 @@ ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const std::string& file_name, std::vector& vk_device_records, Core::System& system_) - : QDialog(parent), - ui(std::make_unique()), title_id{title_id_}, system{system_}, + : QDialog(parent), ui(std::make_unique()), title_id{title_id_}, + system{system_}, builder{std::make_unique(this, !system_.IsPoweredOn())}, tab_group{std::make_shared>()} { const auto file_path = std::filesystem::path(Common::FS::ToU8String(file_name)); @@ -151,6 +154,16 @@ void ConfigurePerGame::LoadConfiguration() { ui->display_title_id->setText( QStringLiteral("%1").arg(title_id, 16, 16, QLatin1Char{'0'}).toUpper()); + Loader::NSOHeader nso_header{}; + if (sizeof(Loader::NSOHeader) != file->ReadObject(&nso_header)) { + LOG_ERROR(Core, "Could not read header for file {}", file->GetFullPath()); + return; + } + + const auto build_id_raw = Common::HexToString(nso_header.build_id); + const auto build_id = build_id_raw.substr(0, build_id_raw.find_last_not_of('0') + 1); + ui->display_build_id->setText(QString::fromStdString(build_id)); + const FileSys::PatchManager pm{title_id, system.GetFileSystemController(), system.GetContentProvider()}; const auto control = pm.GetControlMetadata(); diff --git a/src/suyu/configuration/configure_per_game.ui b/src/suyu/configuration/configure_per_game.ui index 99ba2fd180..a57e9a3527 100644 --- a/src/suyu/configuration/configure_per_game.ui +++ b/src/suyu/configuration/configure_per_game.ui @@ -67,8 +67,18 @@ + + + + true + + + true + + + - + true @@ -77,20 +87,17 @@ - - - - true - - - true - - - - - + + - Name + Size + + + + + + + Filename @@ -101,6 +108,13 @@ + + + + Name + + + @@ -111,7 +125,38 @@ - + + + + Developer + + + + + + + Format + + + + + + + true + + + true + + + + + + + Version + + + + true @@ -121,23 +166,6 @@ - - - - true - - - true - - - - - - - Filename - - - @@ -148,8 +176,8 @@ - - + + true @@ -158,31 +186,17 @@ + + + + true + + + - + - Format - - - - - - - Version - - - - - - - Size - - - - - - - Developer + Build ID