diff options
| author | 2015-01-06 23:10:13 +0000 | |
|---|---|---|
| committer | 2015-01-15 22:23:08 +0100 | |
| commit | 82ec17db7df53ed1c376d1cdaa9a6587719a546d (patch) | |
| tree | 3c2236849146037fbba2fb75ea8a50f53b847a17 /src/core/loader/ncch.h | |
| parent | Loader: Don’t assume the file hasn’t been read before. (diff) | |
| download | yuzu-82ec17db7df53ed1c376d1cdaa9a6587719a546d.tar.gz yuzu-82ec17db7df53ed1c376d1cdaa9a6587719a546d.tar.xz yuzu-82ec17db7df53ed1c376d1cdaa9a6587719a546d.zip | |
Loader: Guess filetype from the magic, or fallback to the extension.
Diffstat (limited to 'src/core/loader/ncch.h')
| -rw-r--r-- | src/core/loader/ncch.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/loader/ncch.h b/src/core/loader/ncch.h index d9d68f154..9ae2de99f 100644 --- a/src/core/loader/ncch.h +++ b/src/core/loader/ncch.h | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | 13 | ||
| 14 | struct NCCH_Header { | 14 | struct NCCH_Header { |
| 15 | u8 signature[0x100]; | 15 | u8 signature[0x100]; |
| 16 | char magic[4]; | 16 | u32 magic; |
| 17 | u32 content_size; | 17 | u32 content_size; |
| 18 | u8 partition_id[8]; | 18 | u8 partition_id[8]; |
| 19 | u16 maker_code; | 19 | u16 maker_code; |
| @@ -149,6 +149,13 @@ public: | |||
| 149 | AppLoader_NCCH(std::unique_ptr<FileUtil::IOFile>&& file) : AppLoader(std::move(file)) { } | 149 | AppLoader_NCCH(std::unique_ptr<FileUtil::IOFile>&& file) : AppLoader(std::move(file)) { } |
| 150 | 150 | ||
| 151 | /** | 151 | /** |
| 152 | * Returns the type of the file | ||
| 153 | * @param file FileUtil::IOFile open file | ||
| 154 | * @return FileType found, or FileType::Error if this loader doesn't know it | ||
| 155 | */ | ||
| 156 | static FileType IdentifyType(FileUtil::IOFile& file); | ||
| 157 | |||
| 158 | /** | ||
| 152 | * Load the application | 159 | * Load the application |
| 153 | * @return ResultStatus result of function | 160 | * @return ResultStatus result of function |
| 154 | */ | 161 | */ |