diff options
| author | 2018-08-08 12:27:19 -0400 | |
|---|---|---|
| committer | 2018-08-08 12:27:19 -0400 | |
| commit | fd9da4232b2f989257630884511ba50e108ad703 (patch) | |
| tree | 0073d61bfa93a8ab0681623bf00428a5731b8854 /src/core/file_sys | |
| parent | Merge pull request #968 from lioncash/vec (diff) | |
| parent | configure_gamelist: Use explicit QVariant constructor (diff) | |
| download | yuzu-fd9da4232b2f989257630884511ba50e108ad703.tar.gz yuzu-fd9da4232b2f989257630884511ba50e108ad703.tar.xz yuzu-fd9da4232b2f989257630884511ba50e108ad703.zip | |
Merge pull request #850 from DarkLordZach/icon-meta
Add Icons and Metadata Support
Diffstat (limited to 'src/core/file_sys')
| -rw-r--r-- | src/core/file_sys/card_image.cpp | 1 | ||||
| -rw-r--r-- | src/core/file_sys/content_archive.cpp | 4 | ||||
| -rw-r--r-- | src/core/file_sys/content_archive.h | 1 | ||||
| -rw-r--r-- | src/core/file_sys/control_metadata.h | 7 |
4 files changed, 13 insertions, 0 deletions
diff --git a/src/core/file_sys/card_image.cpp b/src/core/file_sys/card_image.cpp index 395eea8ae..e897d9913 100644 --- a/src/core/file_sys/card_image.cpp +++ b/src/core/file_sys/card_image.cpp | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #include <array> | 5 | #include <array> |
| 6 | #include <string> | 6 | #include <string> |
| 7 | #include <core/loader/loader.h> | 7 | #include <core/loader/loader.h> |
| 8 | #include "common/logging/log.h" | ||
| 8 | #include "core/file_sys/card_image.h" | 9 | #include "core/file_sys/card_image.h" |
| 9 | #include "core/file_sys/partition_filesystem.h" | 10 | #include "core/file_sys/partition_filesystem.h" |
| 10 | #include "core/file_sys/vfs_offset.h" | 11 | #include "core/file_sys/vfs_offset.h" |
diff --git a/src/core/file_sys/content_archive.cpp b/src/core/file_sys/content_archive.cpp index 3529166ac..d3007d981 100644 --- a/src/core/file_sys/content_archive.cpp +++ b/src/core/file_sys/content_archive.cpp | |||
| @@ -170,6 +170,10 @@ VirtualFile NCA::Decrypt(NCASectionHeader s_header, VirtualFile in, u64 starting | |||
| 170 | } | 170 | } |
| 171 | 171 | ||
| 172 | NCA::NCA(VirtualFile file_) : file(std::move(file_)) { | 172 | NCA::NCA(VirtualFile file_) : file(std::move(file_)) { |
| 173 | if (file == nullptr) { | ||
| 174 | status = Loader::ResultStatus::ErrorInvalidFormat; | ||
| 175 | return; | ||
| 176 | } | ||
| 173 | if (sizeof(NCAHeader) != file->ReadObject(&header)) | 177 | if (sizeof(NCAHeader) != file->ReadObject(&header)) |
| 174 | LOG_ERROR(Loader, "File reader errored out during header read."); | 178 | LOG_ERROR(Loader, "File reader errored out during header read."); |
| 175 | 179 | ||
diff --git a/src/core/file_sys/content_archive.h b/src/core/file_sys/content_archive.h index a8879d9a8..5cfd5031a 100644 --- a/src/core/file_sys/content_archive.h +++ b/src/core/file_sys/content_archive.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include "common/common_funcs.h" | 12 | #include "common/common_funcs.h" |
| 13 | #include "common/common_types.h" | 13 | #include "common/common_types.h" |
| 14 | #include "common/swap.h" | 14 | #include "common/swap.h" |
| 15 | #include "control_metadata.h" | ||
| 15 | #include "core/crypto/key_manager.h" | 16 | #include "core/crypto/key_manager.h" |
| 16 | #include "core/file_sys/partition_filesystem.h" | 17 | #include "core/file_sys/partition_filesystem.h" |
| 17 | #include "core/loader/loader.h" | 18 | #include "core/loader/loader.h" |
diff --git a/src/core/file_sys/control_metadata.h b/src/core/file_sys/control_metadata.h index cc3b745f7..6582cc240 100644 --- a/src/core/file_sys/control_metadata.h +++ b/src/core/file_sys/control_metadata.h | |||
| @@ -62,6 +62,13 @@ enum class Language : u8 { | |||
| 62 | Chinese = 14, | 62 | Chinese = 14, |
| 63 | }; | 63 | }; |
| 64 | 64 | ||
| 65 | static constexpr std::array<const char*, 15> LANGUAGE_NAMES = { | ||
| 66 | "AmericanEnglish", "BritishEnglish", "Japanese", | ||
| 67 | "French", "German", "LatinAmericanSpanish", | ||
| 68 | "Spanish", "Italian", "Dutch", | ||
| 69 | "CanadianFrench", "Portugese", "Russian", | ||
| 70 | "Korean", "Taiwanese", "Chinese"}; | ||
| 71 | |||
| 65 | // A class representing the format used by NX metadata files, typically named Control.nacp. | 72 | // A class representing the format used by NX metadata files, typically named Control.nacp. |
| 66 | // These store application name, dev name, title id, and other miscellaneous data. | 73 | // These store application name, dev name, title id, and other miscellaneous data. |
| 67 | class NACP { | 74 | class NACP { |