diff options
| author | 2017-09-24 11:08:31 -0400 | |
|---|---|---|
| committer | 2017-09-30 14:32:53 -0400 | |
| commit | 6bafd3f4f754e093fe0f99ebf2e1136d3398981a (patch) | |
| tree | d6021353217bfc01416a3b0f737389f103af9640 /src/core/loader/loader.cpp | |
| parent | externals: Add lz4. (diff) | |
| download | yuzu-6bafd3f4f754e093fe0f99ebf2e1136d3398981a.tar.gz yuzu-6bafd3f4f754e093fe0f99ebf2e1136d3398981a.tar.xz yuzu-6bafd3f4f754e093fe0f99ebf2e1136d3398981a.zip | |
loader: Add support for loading an NSO.
Diffstat (limited to 'src/core/loader/loader.cpp')
| -rw-r--r-- | src/core/loader/loader.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp index be719d74c..d309e7c9e 100644 --- a/src/core/loader/loader.cpp +++ b/src/core/loader/loader.cpp | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include "core/loader/3dsx.h" | 10 | #include "core/loader/3dsx.h" |
| 11 | #include "core/loader/elf.h" | 11 | #include "core/loader/elf.h" |
| 12 | #include "core/loader/ncch.h" | 12 | #include "core/loader/ncch.h" |
| 13 | #include "core/loader/nso.h" | ||
| 13 | 14 | ||
| 14 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 15 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 15 | 16 | ||
| @@ -32,6 +33,7 @@ FileType IdentifyFile(FileUtil::IOFile& file) { | |||
| 32 | CHECK_TYPE(THREEDSX) | 33 | CHECK_TYPE(THREEDSX) |
| 33 | CHECK_TYPE(ELF) | 34 | CHECK_TYPE(ELF) |
| 34 | CHECK_TYPE(NCCH) | 35 | CHECK_TYPE(NCCH) |
| 36 | CHECK_TYPE(NSO) | ||
| 35 | 37 | ||
| 36 | #undef CHECK_TYPE | 38 | #undef CHECK_TYPE |
| 37 | 39 | ||
| @@ -115,6 +117,10 @@ static std::unique_ptr<AppLoader> GetFileLoader(FileUtil::IOFile&& file, FileTyp | |||
| 115 | case FileType::CCI: | 117 | case FileType::CCI: |
| 116 | return std::make_unique<AppLoader_NCCH>(std::move(file), filepath); | 118 | return std::make_unique<AppLoader_NCCH>(std::move(file), filepath); |
| 117 | 119 | ||
| 120 | // NX NSO file format. | ||
| 121 | case FileType::NSO: | ||
| 122 | return std::make_unique<AppLoader_NSO>(std::move(file), filename, filepath); | ||
| 123 | |||
| 118 | default: | 124 | default: |
| 119 | return nullptr; | 125 | return nullptr; |
| 120 | } | 126 | } |