From f92b3512e0772a959c6a3c292af600149165e180 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Sat, 25 Aug 2018 19:06:33 -0400 Subject: main: Make game updates installable --- src/yuzu/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 56bd3ee2e..3d438df47 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -868,7 +868,11 @@ void GMainWindow::OnMenuInstallToNAND() { } else { const auto nca = std::make_shared( vfs->OpenFile(filename.toStdString(), FileSys::Mode::Read)); - if (nca->GetStatus() != Loader::ResultStatus::Success) { + const auto id = nca->GetStatus(); + + // Game updates necessary are missing base RomFS + if (nca->GetStatus() != Loader::ResultStatus::Success && + nca->GetStatus() != Loader::ResultStatus::ErrorMissingBKTRBaseRomFS) { failed(); return; } -- cgit v1.2.3 From 9664ce255db09f4501db642c1e82d8cf8f274a22 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Sun, 26 Aug 2018 10:53:31 -0400 Subject: bktr: Fix missing includes and optimize style --- src/yuzu/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 3d438df47..b7ce0248b 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -871,8 +871,8 @@ void GMainWindow::OnMenuInstallToNAND() { const auto id = nca->GetStatus(); // Game updates necessary are missing base RomFS - if (nca->GetStatus() != Loader::ResultStatus::Success && - nca->GetStatus() != Loader::ResultStatus::ErrorMissingBKTRBaseRomFS) { + if (id != Loader::ResultStatus::Success && + id != Loader::ResultStatus::ErrorMissingBKTRBaseRomFS) { failed(); return; } -- cgit v1.2.3 From 23a16c1720ee522f6ac7d1f426a2d4a918ce41c9 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Mon, 3 Sep 2018 18:57:52 -0400 Subject: patch_manager: Centralize Control-type NCA parsing --- src/yuzu/main.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index b7ce0248b..80a284513 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -592,8 +592,16 @@ void GMainWindow::BootGame(const QString& filename) { std::string title_name; const auto res = Core::System::GetInstance().GetGameName(title_name); - if (res != Loader::ResultStatus::Success) - title_name = FileUtil::GetFilename(filename.toStdString()); + if (res != Loader::ResultStatus::Success) { + const u64 program_id = Core::System::GetInstance().CurrentProcess()->program_id; + + const auto [nacp, icon_file] = FileSys::PatchManager(program_id).GetControlMetadata(); + if (nacp != nullptr) + title_name = nacp->GetApplicationName(); + + if (title_name.empty()) + title_name = FileUtil::GetFilename(filename.toStdString()); + } setWindowTitle(QString("yuzu %1| %4 | %2-%3") .arg(Common::g_build_name, Common::g_scm_branch, Common::g_scm_desc, -- cgit v1.2.3 From c913136eb215699f9c8d51a8fd56490b9df7657f Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Tue, 4 Sep 2018 17:01:40 -0400 Subject: bktr: Fix bucket overlap error --- src/yuzu/main.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 80a284513..dbe5bd8a4 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -32,6 +32,8 @@ #include "core/crypto/key_manager.h" #include "core/file_sys/card_image.h" #include "core/file_sys/content_archive.h" +#include "core/file_sys/control_metadata.h" +#include "core/file_sys/patch_manager.h" #include "core/file_sys/registered_cache.h" #include "core/file_sys/savedata_factory.h" #include "core/file_sys/submission_package.h" -- cgit v1.2.3