diff options
author | bunnei <ericbunnie@gmail.com> | 2014-06-27 22:18:56 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2014-07-05 02:37:45 +0200 |
commit | 17a6148f9df406a6ca4bdca98777e0aaf21f582a (patch) | |
tree | 3763cf9417649428c81c7e9e0cb6abac251faa49 /src/core/loader | |
parent | APT: Added stubbed ReceiveParameter and various cleanups. (diff) | |
download | yuzu-17a6148f9df406a6ca4bdca98777e0aaf21f582a.tar yuzu-17a6148f9df406a6ca4bdca98777e0aaf21f582a.tar.gz yuzu-17a6148f9df406a6ca4bdca98777e0aaf21f582a.tar.bz2 yuzu-17a6148f9df406a6ca4bdca98777e0aaf21f582a.tar.lz yuzu-17a6148f9df406a6ca4bdca98777e0aaf21f582a.tar.xz yuzu-17a6148f9df406a6ca4bdca98777e0aaf21f582a.tar.zst yuzu-17a6148f9df406a6ca4bdca98777e0aaf21f582a.zip |
Diffstat (limited to 'src/core/loader')
-rw-r--r-- | src/core/loader/loader.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp index 96cb81de0..2b42e3c64 100644 --- a/src/core/loader/loader.cpp +++ b/src/core/loader/loader.cpp @@ -4,9 +4,11 @@ #include <memory> +#include "core/file_sys/archive_romfs.h" #include "core/loader/loader.h" #include "core/loader/elf.h" #include "core/loader/ncch.h" +#include "core/hle/kernel/archive.h" //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -51,14 +53,20 @@ ResultStatus LoadFile(const std::string& filename) { switch (IdentifyFile(filename)) { // Standard ELF file format... - case FileType::ELF: { + case FileType::ELF: return AppLoader_ELF(filename).Load(); - } // NCCH/NCSD container formats... case FileType::CXI: case FileType::CCI: { - return AppLoader_NCCH(filename).Load(); + AppLoader_NCCH app_loader(filename); + + // Load application and RomFS + if (ResultStatus::Success == app_loader.Load()) { + Kernel::CreateArchive(new FileSys::Archive_RomFS(app_loader), "RomFS"); + return ResultStatus::Success; + } + break; } // Error occurred durring IdentifyFile... @@ -70,7 +78,6 @@ ResultStatus LoadFile(const std::string& filename) { default: return ResultStatus::ErrorInvalidFormat; } - return ResultStatus::Error; } |