diff options
| author | 2014-06-27 16:18:56 -0400 | |
|---|---|---|
| committer | 2014-07-04 20:37:45 -0400 | |
| commit | 17a6148f9df406a6ca4bdca98777e0aaf21f582a (patch) | |
| tree | 3763cf9417649428c81c7e9e0cb6abac251faa49 /src/core/loader/loader.cpp | |
| parent | APT: Added stubbed ReceiveParameter and various cleanups. (diff) | |
| download | yuzu-17a6148f9df406a6ca4bdca98777e0aaf21f582a.tar.gz yuzu-17a6148f9df406a6ca4bdca98777e0aaf21f582a.tar.xz yuzu-17a6148f9df406a6ca4bdca98777e0aaf21f582a.zip | |
FileSys: Added preliminary support for applications reading the RomFS archive.
Archive: Fixed brace ugliness for neobrain :)
FS: Commented out unused local variables to prevent warnings.
...But keeping them here for future use.
archive_romfs: Removed unused #include.
Diffstat (limited to 'src/core/loader/loader.cpp')
| -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 @@ | |||
| 4 | 4 | ||
| 5 | #include <memory> | 5 | #include <memory> |
| 6 | 6 | ||
| 7 | #include "core/file_sys/archive_romfs.h" | ||
| 7 | #include "core/loader/loader.h" | 8 | #include "core/loader/loader.h" |
| 8 | #include "core/loader/elf.h" | 9 | #include "core/loader/elf.h" |
| 9 | #include "core/loader/ncch.h" | 10 | #include "core/loader/ncch.h" |
| 11 | #include "core/hle/kernel/archive.h" | ||
| 10 | 12 | ||
| 11 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 13 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 12 | 14 | ||
| @@ -51,14 +53,20 @@ ResultStatus LoadFile(const std::string& filename) { | |||
| 51 | switch (IdentifyFile(filename)) { | 53 | switch (IdentifyFile(filename)) { |
| 52 | 54 | ||
| 53 | // Standard ELF file format... | 55 | // Standard ELF file format... |
| 54 | case FileType::ELF: { | 56 | case FileType::ELF: |
| 55 | return AppLoader_ELF(filename).Load(); | 57 | return AppLoader_ELF(filename).Load(); |
| 56 | } | ||
| 57 | 58 | ||
| 58 | // NCCH/NCSD container formats... | 59 | // NCCH/NCSD container formats... |
| 59 | case FileType::CXI: | 60 | case FileType::CXI: |
| 60 | case FileType::CCI: { | 61 | case FileType::CCI: { |
| 61 | return AppLoader_NCCH(filename).Load(); | 62 | AppLoader_NCCH app_loader(filename); |
| 63 | |||
| 64 | // Load application and RomFS | ||
| 65 | if (ResultStatus::Success == app_loader.Load()) { | ||
| 66 | Kernel::CreateArchive(new FileSys::Archive_RomFS(app_loader), "RomFS"); | ||
| 67 | return ResultStatus::Success; | ||
| 68 | } | ||
| 69 | break; | ||
| 62 | } | 70 | } |
| 63 | 71 | ||
| 64 | // Error occurred durring IdentifyFile... | 72 | // Error occurred durring IdentifyFile... |
| @@ -70,7 +78,6 @@ ResultStatus LoadFile(const std::string& filename) { | |||
| 70 | default: | 78 | default: |
| 71 | return ResultStatus::ErrorInvalidFormat; | 79 | return ResultStatus::ErrorInvalidFormat; |
| 72 | } | 80 | } |
| 73 | |||
| 74 | return ResultStatus::Error; | 81 | return ResultStatus::Error; |
| 75 | } | 82 | } |
| 76 | 83 | ||