diff options
| author | 2018-12-24 16:19:41 -0500 | |
|---|---|---|
| committer | 2018-12-28 15:32:39 -0500 | |
| commit | 4c20a3982807386a2e5fc6f536498b73e6f4f6ce (patch) | |
| tree | 0b26e40304df106c4e0b1ade9fa60bccdd8b240b /src/core/loader/xci.cpp | |
| parent | hid: Make Hid service accessible and add GetPressState (diff) | |
| download | yuzu-4c20a3982807386a2e5fc6f536498b73e6f4f6ce.tar.gz yuzu-4c20a3982807386a2e5fc6f536498b73e6f4f6ce.tar.xz yuzu-4c20a3982807386a2e5fc6f536498b73e6f4f6ce.zip | |
loader: Add accessor for Manual RomFS
Diffstat (limited to 'src/core/loader/xci.cpp')
| -rw-r--r-- | src/core/loader/xci.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/loader/xci.cpp b/src/core/loader/xci.cpp index e67e43c69..ff60a3756 100644 --- a/src/core/loader/xci.cpp +++ b/src/core/loader/xci.cpp | |||
| @@ -128,4 +128,13 @@ ResultStatus AppLoader_XCI::ReadControlData(FileSys::NACP& control) { | |||
| 128 | return ResultStatus::Success; | 128 | return ResultStatus::Success; |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | ResultStatus AppLoader_XCI::ReadManualRomFS(FileSys::VirtualFile& file) { | ||
| 132 | const auto nca = xci->GetSecurePartitionNSP()->GetNCA(xci->GetProgramTitleID(), | ||
| 133 | FileSys::ContentRecordType::Manual); | ||
| 134 | if (xci->GetStatus() != ResultStatus::Success || nca == nullptr) | ||
| 135 | return ResultStatus::ErrorXCIMissingPartition; | ||
| 136 | file = nca->GetRomFS(); | ||
| 137 | return file == nullptr ? ResultStatus::ErrorNoRomFS : ResultStatus::Success; | ||
| 138 | } | ||
| 139 | |||
| 131 | } // namespace Loader | 140 | } // namespace Loader |