diff options
author | Zach Hilman <DarkLordZach@users.noreply.github.com> | 2018-06-21 17:16:23 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-06-21 17:16:23 +0200 |
commit | 63f26d5c40adb49094b03b232528672f526afe49 (patch) | |
tree | b76a154e17c819df7803d5860f08406446507a5c /src/core/loader/loader.cpp | |
parent | Merge pull request #576 from Subv/warnings1 (diff) | |
download | yuzu-63f26d5c40adb49094b03b232528672f526afe49.tar yuzu-63f26d5c40adb49094b03b232528672f526afe49.tar.gz yuzu-63f26d5c40adb49094b03b232528672f526afe49.tar.bz2 yuzu-63f26d5c40adb49094b03b232528672f526afe49.tar.lz yuzu-63f26d5c40adb49094b03b232528672f526afe49.tar.xz yuzu-63f26d5c40adb49094b03b232528672f526afe49.tar.zst yuzu-63f26d5c40adb49094b03b232528672f526afe49.zip |
Diffstat (limited to 'src/core/loader/loader.cpp')
-rw-r--r-- | src/core/loader/loader.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp index 6a4fd38cb..20cc0bac0 100644 --- a/src/core/loader/loader.cpp +++ b/src/core/loader/loader.cpp @@ -9,6 +9,7 @@ #include "core/hle/kernel/process.h" #include "core/loader/deconstructed_rom_directory.h" #include "core/loader/elf.h" +#include "core/loader/nca.h" #include "core/loader/nro.h" #include "core/loader/nso.h" @@ -32,6 +33,7 @@ FileType IdentifyFile(FileUtil::IOFile& file, const std::string& filepath) { CHECK_TYPE(ELF) CHECK_TYPE(NSO) CHECK_TYPE(NRO) + CHECK_TYPE(NCA) #undef CHECK_TYPE @@ -57,6 +59,8 @@ FileType GuessFromExtension(const std::string& extension_) { return FileType::NRO; else if (extension == ".nso") return FileType::NSO; + else if (extension == ".nca") + return FileType::NCA; return FileType::Unknown; } @@ -69,6 +73,8 @@ const char* GetFileTypeString(FileType type) { return "NRO"; case FileType::NSO: return "NSO"; + case FileType::NCA: + return "NCA"; case FileType::DeconstructedRomDirectory: return "Directory"; case FileType::Error: @@ -104,6 +110,10 @@ static std::unique_ptr<AppLoader> GetFileLoader(FileUtil::IOFile&& file, FileTyp case FileType::NRO: return std::make_unique<AppLoader_NRO>(std::move(file), filepath); + // NX NCA file format. + case FileType::NCA: + return std::make_unique<AppLoader_NCA>(std::move(file), filepath); + // NX deconstructed ROM directory. case FileType::DeconstructedRomDirectory: return std::make_unique<AppLoader_DeconstructedRomDirectory>(std::move(file), filepath); |