diff options
Diffstat (limited to 'src/core/loader/elf.h')
| -rw-r--r-- | src/core/loader/elf.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/loader/elf.h b/src/core/loader/elf.h index b8fb982d0..ee741a789 100644 --- a/src/core/loader/elf.h +++ b/src/core/loader/elf.h | |||
| @@ -16,20 +16,24 @@ namespace Loader { | |||
| 16 | /// Loads an ELF/AXF file | 16 | /// Loads an ELF/AXF file |
| 17 | class AppLoader_ELF final : public AppLoader { | 17 | class AppLoader_ELF final : public AppLoader { |
| 18 | public: | 18 | public: |
| 19 | explicit AppLoader_ELF(FileSys::VirtualFile file); | 19 | AppLoader_ELF(FileUtil::IOFile&& file, std::string filename); |
| 20 | 20 | ||
| 21 | /** | 21 | /** |
| 22 | * Returns the type of the file | 22 | * Returns the type of the file |
| 23 | * @param file std::shared_ptr<VfsFile> open file | 23 | * @param file FileUtil::IOFile open file |
| 24 | * @param filepath Path of the file that we are opening. | ||
| 24 | * @return FileType found, or FileType::Error if this loader doesn't know it | 25 | * @return FileType found, or FileType::Error if this loader doesn't know it |
| 25 | */ | 26 | */ |
| 26 | static FileType IdentifyType(const FileSys::VirtualFile& file); | 27 | static FileType IdentifyType(FileUtil::IOFile& file, const std::string& filepath); |
| 27 | 28 | ||
| 28 | FileType GetFileType() override { | 29 | FileType GetFileType() override { |
| 29 | return IdentifyType(file); | 30 | return IdentifyType(file, filename); |
| 30 | } | 31 | } |
| 31 | 32 | ||
| 32 | ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) override; | 33 | ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) override; |
| 34 | |||
| 35 | private: | ||
| 36 | std::string filename; | ||
| 33 | }; | 37 | }; |
| 34 | 38 | ||
| 35 | } // namespace Loader | 39 | } // namespace Loader |