diff --git a/src/core/loader/3dsx.h b/src/core/loader/3dsx.h index 3ee686703..90b20c61c 100644 --- a/src/core/loader/3dsx.h +++ b/src/core/loader/3dsx.h @@ -27,6 +27,14 @@ public: */ static FileType IdentifyType(FileUtil::IOFile& file); + /** + * Returns the type of this file + * @return FileType corresponding to the loaded file + */ + FileType GetFileType() override { + return IdentifyType(file); + } + /** * Load the bootable file * @return ResultStatus result of function diff --git a/src/core/loader/elf.h b/src/core/loader/elf.h index c6a5ebe99..cb3724f9d 100644 --- a/src/core/loader/elf.h +++ b/src/core/loader/elf.h @@ -27,6 +27,14 @@ public: */ static FileType IdentifyType(FileUtil::IOFile& file); + /** + * Returns the type of this file + * @return FileType corresponding to the loaded file + */ + FileType GetFileType() override { + return IdentifyType(file); + } + /** * Load the bootable file * @return ResultStatus result of function diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h index 4a4bd7c77..08bab84e5 100644 --- a/src/core/loader/loader.h +++ b/src/core/loader/loader.h @@ -131,6 +131,12 @@ public: AppLoader(FileUtil::IOFile&& file) : file(std::move(file)) { } virtual ~AppLoader() { } + /** + * Returns the type of this file + * @return FileType corresponding to the loaded file + */ + virtual FileType GetFileType() = 0; + /** * Load the application * @return ResultStatus result of function diff --git a/src/core/loader/ncch.h b/src/core/loader/ncch.h index fd852c3de..75609ee57 100644 --- a/src/core/loader/ncch.h +++ b/src/core/loader/ncch.h @@ -173,6 +173,14 @@ public: */ static FileType IdentifyType(FileUtil::IOFile& file); + /** + * Returns the type of this file + * @return FileType corresponding to the loaded file + */ + FileType GetFileType() override { + return IdentifyType(file); + } + /** * Load the application * @return ResultStatus result of function