Jelajahi Sumber

card_image: Add accessor for all NCAs in XCI

Zach Hilman 8 tahun lalu
induk
melakukan
ab8acce645
2 mengubah file dengan 5 tambahan dan 0 penghapusan
  1. 4 0
      src/core/file_sys/card_image.cpp
  2. 1 0
      src/core/file_sys/card_image.h

+ 4 - 0
src/core/file_sys/card_image.cpp

@@ -93,6 +93,10 @@ VirtualDir XCI::GetLogoPartition() const {
     return GetPartition(XCIPartition::Logo);
 }
 
+const std::vector<std::shared_ptr<NCA>>& XCI::GetNCAs() const {
+    return ncas;
+}
+
 std::shared_ptr<NCA> XCI::GetNCAByType(NCAContentType type) const {
     const auto iter =
         std::find_if(ncas.begin(), ncas.end(),

+ 1 - 0
src/core/file_sys/card_image.h

@@ -68,6 +68,7 @@ public:
     VirtualDir GetUpdatePartition() const;
     VirtualDir GetLogoPartition() const;
 
+    const std::vector<std::shared_ptr<NCA>>& GetNCAs() const;
     std::shared_ptr<NCA> GetNCAByType(NCAContentType type) const;
     VirtualFile GetNCAFileByType(NCAContentType type) const;