summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-06-05 06:22:07 +0200
committerZach Hilman <zachhilman@gmail.com>2019-06-05 06:22:07 +0200
commitce9f7ac4f2023b81e5d97a06c0fb17d252002697 (patch)
tree0a7358010068511ac174ed9b7922883364827c7c
parentloader: Add KIP and INI file parser-specific errors (diff)
downloadyuzu-ce9f7ac4f2023b81e5d97a06c0fb17d252002697.tar
yuzu-ce9f7ac4f2023b81e5d97a06c0fb17d252002697.tar.gz
yuzu-ce9f7ac4f2023b81e5d97a06c0fb17d252002697.tar.bz2
yuzu-ce9f7ac4f2023b81e5d97a06c0fb17d252002697.tar.lz
yuzu-ce9f7ac4f2023b81e5d97a06c0fb17d252002697.tar.xz
yuzu-ce9f7ac4f2023b81e5d97a06c0fb17d252002697.tar.zst
yuzu-ce9f7ac4f2023b81e5d97a06c0fb17d252002697.zip
-rw-r--r--src/core/loader/loader.cpp10
-rw-r--r--src/core/loader/loader.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp
index 8a783ae2f..59ca7091a 100644
--- a/src/core/loader/loader.cpp
+++ b/src/core/loader/loader.cpp
@@ -11,6 +11,7 @@
#include "core/hle/kernel/process.h"
#include "core/loader/deconstructed_rom_directory.h"
#include "core/loader/elf.h"
+#include "core/loader/kip.h"
#include "core/loader/nax.h"
#include "core/loader/nca.h"
#include "core/loader/nro.h"
@@ -36,6 +37,7 @@ FileType IdentifyFile(FileSys::VirtualFile file) {
CHECK_TYPE(XCI)
CHECK_TYPE(NAX)
CHECK_TYPE(NSP)
+ CHECK_TYPE(KIP)
#undef CHECK_TYPE
@@ -63,6 +65,8 @@ FileType GuessFromFilename(const std::string& name) {
return FileType::XCI;
if (extension == "nsp")
return FileType::NSP;
+ if (extension == "kip")
+ return FileType::KIP;
return FileType::Unknown;
}
@@ -83,6 +87,8 @@ std::string GetFileTypeString(FileType type) {
return "NAX";
case FileType::NSP:
return "NSP";
+ case FileType::KIP:
+ return "KIP";
case FileType::DeconstructedRomDirectory:
return "Directory";
case FileType::Error:
@@ -209,6 +215,10 @@ static std::unique_ptr<AppLoader> GetFileLoader(FileSys::VirtualFile file, FileT
case FileType::NSP:
return std::make_unique<AppLoader_NSP>(std::move(file));
+ // NX KIP (Kernel Internal Process) file format
+ case FileType::KIP:
+ return std::make_unique<AppLoader_KIP>(std::move(file));
+
// NX deconstructed ROM directory.
case FileType::DeconstructedRomDirectory:
return std::make_unique<AppLoader_DeconstructedRomDirectory>(std::move(file));
diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h
index fbca730a2..4068a60f8 100644
--- a/src/core/loader/loader.h
+++ b/src/core/loader/loader.h
@@ -37,6 +37,7 @@ enum class FileType {
NSP,
XCI,
NAX,
+ KIP,
DeconstructedRomDirectory,
};