aboutsummaryrefslogtreecommitdiff
path: root/src/core/loader/nsp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/loader/nsp.cpp')
-rw-r--r--src/core/loader/nsp.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/loader/nsp.cpp b/src/core/loader/nsp.cpp
index cfc908b4ef..8b2c79394d 100644
--- a/src/core/loader/nsp.cpp
+++ b/src/core/loader/nsp.cpp
@@ -56,6 +56,17 @@ AppLoader_NSP::AppLoader_NSP(FileSys::VirtualFile file_,
AppLoader_NSP::~AppLoader_NSP() = default;
FileType AppLoader_NSP::IdentifyType(const FileSys::VirtualFile& nsp_file) {
+ // .nsz is NSP-compatible; return NSZ so the game list shows the right type.
+ if (nsp_file->GetName().ends_with(".nsz")) {
+ return FileType::NSZ;
+ }
+
+ // PFS0-shaped .xcz containers are handled by this loader too; report XCZ so the game
+ // list does not show them as NSP. XCI-shaped .xcz is identified by AppLoader_XCI.
+ if (nsp_file->GetName().ends_with(".xcz")) {
+ return FileType::XCZ;
+ }
+
const FileSys::NSP nsp(nsp_file);
if (nsp.GetStatus() != ResultStatus::Success) {