summaryrefslogtreecommitdiff
path: root/src/core/loader/ncch.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/loader/ncch.h')
-rw-r--r--src/core/loader/ncch.h39
1 files changed, 20 insertions, 19 deletions
diff --git a/src/core/loader/ncch.h b/src/core/loader/ncch.h
index 75609ee57..0cd70f70c 100644
--- a/src/core/loader/ncch.h
+++ b/src/core/loader/ncch.h
@@ -164,7 +164,8 @@ namespace Loader {
164class AppLoader_NCCH final : public AppLoader { 164class AppLoader_NCCH final : public AppLoader {
165public: 165public:
166 AppLoader_NCCH(FileUtil::IOFile&& file, const std::string& filepath) 166 AppLoader_NCCH(FileUtil::IOFile&& file, const std::string& filepath)
167 : AppLoader(std::move(file)), filepath(filepath) { } 167 : AppLoader(std::move(file)), filepath(filepath) {
168 }
168 169
169 /** 170 /**
170 * Returns the type of the file 171 * Returns the type of the file
@@ -222,10 +223,10 @@ public:
222 * @param size Size of the RomFS in bytes 223 * @param size Size of the RomFS in bytes
223 * @return ResultStatus result of function 224 * @return ResultStatus result of function
224 */ 225 */
225 ResultStatus ReadRomFS(std::shared_ptr<FileUtil::IOFile>& romfs_file, u64& offset, u64& size) override; 226 ResultStatus ReadRomFS(std::shared_ptr<FileUtil::IOFile>& romfs_file, u64& offset,
227 u64& size) override;
226 228
227private: 229private:
228
229 /** 230 /**
230 * Reads an application ExeFS section of an NCCH file into AppLoader (e.g. .code, .logo, etc.) 231 * Reads an application ExeFS section of an NCCH file into AppLoader (e.g. .code, .logo, etc.)
231 * @param name Name of section to read out of NCCH file 232 * @param name Name of section to read out of NCCH file
@@ -246,24 +247,24 @@ private:
246 */ 247 */
247 ResultStatus LoadExeFS(); 248 ResultStatus LoadExeFS();
248 249
249 bool is_exefs_loaded = false; 250 bool is_exefs_loaded = false;
250 bool is_compressed = false; 251 bool is_compressed = false;
251 252
252 u32 entry_point = 0; 253 u32 entry_point = 0;
253 u32 code_size = 0; 254 u32 code_size = 0;
254 u32 stack_size = 0; 255 u32 stack_size = 0;
255 u32 bss_size = 0; 256 u32 bss_size = 0;
256 u32 core_version = 0; 257 u32 core_version = 0;
257 u8 priority = 0; 258 u8 priority = 0;
258 u8 resource_limit_category = 0; 259 u8 resource_limit_category = 0;
259 u32 ncch_offset = 0; // Offset to NCCH header, can be 0 or after NCSD header 260 u32 ncch_offset = 0; // Offset to NCCH header, can be 0 or after NCSD header
260 u32 exefs_offset = 0; 261 u32 exefs_offset = 0;
261 262
262 NCCH_Header ncch_header; 263 NCCH_Header ncch_header;
263 ExeFs_Header exefs_header; 264 ExeFs_Header exefs_header;
264 ExHeader_Header exheader_header; 265 ExHeader_Header exheader_header;
265 266
266 std::string filepath; 267 std::string filepath;
267}; 268};
268 269
269} // namespace Loader 270} // namespace Loader