diff options
Diffstat (limited to 'src/core/file_sys')
| -rw-r--r-- | src/core/file_sys/card_image.cpp | 10 | ||||
| -rw-r--r-- | src/core/file_sys/card_image.h | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/core/file_sys/card_image.cpp b/src/core/file_sys/card_image.cpp index 8f5142a07..ecdd7505b 100644 --- a/src/core/file_sys/card_image.cpp +++ b/src/core/file_sys/card_image.cpp | |||
| @@ -122,14 +122,16 @@ u64 XCI::GetProgramTitleID() const { | |||
| 122 | return secure_partition->GetProgramTitleID(); | 122 | return secure_partition->GetProgramTitleID(); |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | std::shared_ptr<NCA> XCI::GetProgramNCA() const { | 125 | bool XCI::HasProgramNCA() const { |
| 126 | return program; | 126 | return program != nullptr; |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | VirtualFile XCI::GetProgramNCAFile() const { | 129 | VirtualFile XCI::GetProgramNCAFile() const { |
| 130 | if (GetProgramNCA() == nullptr) | 130 | if (!HasProgramNCA()) { |
| 131 | return nullptr; | 131 | return nullptr; |
| 132 | return GetProgramNCA()->GetBaseFile(); | 132 | } |
| 133 | |||
| 134 | return program->GetBaseFile(); | ||
| 133 | } | 135 | } |
| 134 | 136 | ||
| 135 | const std::vector<std::shared_ptr<NCA>>& XCI::GetNCAs() const { | 137 | const std::vector<std::shared_ptr<NCA>>& XCI::GetNCAs() const { |
diff --git a/src/core/file_sys/card_image.h b/src/core/file_sys/card_image.h index ce514dfa0..48cbef666 100644 --- a/src/core/file_sys/card_image.h +++ b/src/core/file_sys/card_image.h | |||
| @@ -80,7 +80,7 @@ public: | |||
| 80 | 80 | ||
| 81 | u64 GetProgramTitleID() const; | 81 | u64 GetProgramTitleID() const; |
| 82 | 82 | ||
| 83 | std::shared_ptr<NCA> GetProgramNCA() const; | 83 | bool HasProgramNCA() const; |
| 84 | VirtualFile GetProgramNCAFile() const; | 84 | VirtualFile GetProgramNCAFile() const; |
| 85 | const std::vector<std::shared_ptr<NCA>>& GetNCAs() const; | 85 | const std::vector<std::shared_ptr<NCA>>& GetNCAs() const; |
| 86 | std::shared_ptr<NCA> GetNCAByType(NCAContentType type) const; | 86 | std::shared_ptr<NCA> GetNCAByType(NCAContentType type) const; |