diff options
Diffstat (limited to 'src/core/loader/3dsx.cpp')
-rw-r--r-- | src/core/loader/3dsx.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/core/loader/3dsx.cpp b/src/core/loader/3dsx.cpp index e239808f34..f3e09ecd6d 100644 --- a/src/core/loader/3dsx.cpp +++ b/src/core/loader/3dsx.cpp @@ -44,7 +44,6 @@ enum THREEDSX_Error { static const u32 RELOCBUFSIZE = 512; // File header -static const u32 THREEDSX_MAGIC = 0x58534433; // '3DSX' #pragma pack(1) struct THREEDSX_Header { @@ -202,6 +201,18 @@ static THREEDSX_Error Load3DSXFile(FileUtil::IOFile& file, u32 base_addr) return ERROR_NONE; } +FileType AppLoader_THREEDSX::IdentifyType(FileUtil::IOFile& file) { + u32 magic; + file.Seek(0, SEEK_SET); + if (1 != file.ReadArray<u32>(&magic, 1)) + return FileType::Error; + + if (MakeMagic('3', 'D', 'S', 'X') == magic) + return FileType::THREEDSX; + + return FileType::Error; +} + ResultStatus AppLoader_THREEDSX::Load() { if (is_loaded) return ResultStatus::ErrorAlreadyLoaded; |