mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-18 04:27:41 +01:00
loader: Add recognition for KIP file type
This commit is contained in:
parent
a76bd49268
commit
ce9f7ac4f2
@ -11,6 +11,7 @@
|
|||||||
#include "core/hle/kernel/process.h"
|
#include "core/hle/kernel/process.h"
|
||||||
#include "core/loader/deconstructed_rom_directory.h"
|
#include "core/loader/deconstructed_rom_directory.h"
|
||||||
#include "core/loader/elf.h"
|
#include "core/loader/elf.h"
|
||||||
|
#include "core/loader/kip.h"
|
||||||
#include "core/loader/nax.h"
|
#include "core/loader/nax.h"
|
||||||
#include "core/loader/nca.h"
|
#include "core/loader/nca.h"
|
||||||
#include "core/loader/nro.h"
|
#include "core/loader/nro.h"
|
||||||
@ -36,6 +37,7 @@ FileType IdentifyFile(FileSys::VirtualFile file) {
|
|||||||
CHECK_TYPE(XCI)
|
CHECK_TYPE(XCI)
|
||||||
CHECK_TYPE(NAX)
|
CHECK_TYPE(NAX)
|
||||||
CHECK_TYPE(NSP)
|
CHECK_TYPE(NSP)
|
||||||
|
CHECK_TYPE(KIP)
|
||||||
|
|
||||||
#undef CHECK_TYPE
|
#undef CHECK_TYPE
|
||||||
|
|
||||||
@ -63,6 +65,8 @@ FileType GuessFromFilename(const std::string& name) {
|
|||||||
return FileType::XCI;
|
return FileType::XCI;
|
||||||
if (extension == "nsp")
|
if (extension == "nsp")
|
||||||
return FileType::NSP;
|
return FileType::NSP;
|
||||||
|
if (extension == "kip")
|
||||||
|
return FileType::KIP;
|
||||||
|
|
||||||
return FileType::Unknown;
|
return FileType::Unknown;
|
||||||
}
|
}
|
||||||
@ -83,6 +87,8 @@ std::string GetFileTypeString(FileType type) {
|
|||||||
return "NAX";
|
return "NAX";
|
||||||
case FileType::NSP:
|
case FileType::NSP:
|
||||||
return "NSP";
|
return "NSP";
|
||||||
|
case FileType::KIP:
|
||||||
|
return "KIP";
|
||||||
case FileType::DeconstructedRomDirectory:
|
case FileType::DeconstructedRomDirectory:
|
||||||
return "Directory";
|
return "Directory";
|
||||||
case FileType::Error:
|
case FileType::Error:
|
||||||
@ -209,6 +215,10 @@ static std::unique_ptr<AppLoader> GetFileLoader(FileSys::VirtualFile file, FileT
|
|||||||
case FileType::NSP:
|
case FileType::NSP:
|
||||||
return std::make_unique<AppLoader_NSP>(std::move(file));
|
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.
|
// NX deconstructed ROM directory.
|
||||||
case FileType::DeconstructedRomDirectory:
|
case FileType::DeconstructedRomDirectory:
|
||||||
return std::make_unique<AppLoader_DeconstructedRomDirectory>(std::move(file));
|
return std::make_unique<AppLoader_DeconstructedRomDirectory>(std::move(file));
|
||||||
|
@ -37,6 +37,7 @@ enum class FileType {
|
|||||||
NSP,
|
NSP,
|
||||||
XCI,
|
XCI,
|
||||||
NAX,
|
NAX,
|
||||||
|
KIP,
|
||||||
DeconstructedRomDirectory,
|
DeconstructedRomDirectory,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user