From bfc5bacecd194589476ad965e5849ac5b009771d Mon Sep 17 00:00:00 2001 From: Nick Renieris Date: Sun, 8 Sep 2019 00:40:21 +0300 Subject: nro: Implement ReadControlData With this, the "Developer" field in the Properties for homebrew is now populated. Signed-off-by: Nick Renieris --- src/core/loader/nro.cpp | 9 +++++++++ src/core/loader/nro.h | 1 + 2 files changed, 10 insertions(+) (limited to 'src/core') diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp index e92e2e06e..3a5361fdd 100644 --- a/src/core/loader/nro.cpp +++ b/src/core/loader/nro.cpp @@ -258,6 +258,15 @@ ResultStatus AppLoader_NRO::ReadTitle(std::string& title) { return ResultStatus::Success; } +ResultStatus AppLoader_NRO::ReadControlData(FileSys::NACP& control) { + if (nacp == nullptr) { + return ResultStatus::ErrorNoControl; + } + + control = *nacp; + return ResultStatus::Success; +} + bool AppLoader_NRO::IsRomFSUpdatable() const { return false; } diff --git a/src/core/loader/nro.h b/src/core/loader/nro.h index 1ffdae805..71811bc29 100644 --- a/src/core/loader/nro.h +++ b/src/core/loader/nro.h @@ -43,6 +43,7 @@ public: ResultStatus ReadProgramId(u64& out_program_id) override; ResultStatus ReadRomFS(FileSys::VirtualFile& dir) override; ResultStatus ReadTitle(std::string& title) override; + ResultStatus ReadControlData(FileSys::NACP& control) override; bool IsRomFSUpdatable() const override; private: -- cgit v1.2.3