diff options
Diffstat (limited to 'src/core/loader/nro.h')
| -rw-r--r-- | src/core/loader/nro.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/core/loader/nro.h b/src/core/loader/nro.h index e20fa1555..599adb253 100644 --- a/src/core/loader/nro.h +++ b/src/core/loader/nro.h | |||
| @@ -4,10 +4,8 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <map> | ||
| 8 | #include <string> | 7 | #include <string> |
| 9 | #include "common/common_types.h" | 8 | #include "common/common_types.h" |
| 10 | #include "common/file_util.h" | ||
| 11 | #include "core/hle/kernel/kernel.h" | 9 | #include "core/hle/kernel/kernel.h" |
| 12 | #include "core/loader/linker.h" | 10 | #include "core/loader/linker.h" |
| 13 | #include "core/loader/loader.h" | 11 | #include "core/loader/loader.h" |
| @@ -17,18 +15,18 @@ namespace Loader { | |||
| 17 | /// Loads an NRO file | 15 | /// Loads an NRO file |
| 18 | class AppLoader_NRO final : public AppLoader, Linker { | 16 | class AppLoader_NRO final : public AppLoader, Linker { |
| 19 | public: | 17 | public: |
| 20 | AppLoader_NRO(FileUtil::IOFile&& file, std::string filepath) | 18 | AppLoader_NRO(FileUtil::IOFile&& file, std::string filepath); |
| 21 | : AppLoader(std::move(file)), filepath(std::move(filepath)) {} | ||
| 22 | 19 | ||
| 23 | /** | 20 | /** |
| 24 | * Returns the type of the file | 21 | * Returns the type of the file |
| 25 | * @param file FileUtil::IOFile open file | 22 | * @param file FileUtil::IOFile open file |
| 23 | * @param filepath Path of the file that we are opening. | ||
| 26 | * @return FileType found, or FileType::Error if this loader doesn't know it | 24 | * @return FileType found, or FileType::Error if this loader doesn't know it |
| 27 | */ | 25 | */ |
| 28 | static FileType IdentifyType(FileUtil::IOFile& file); | 26 | static FileType IdentifyType(FileUtil::IOFile& file, const std::string& filepath); |
| 29 | 27 | ||
| 30 | FileType GetFileType() override { | 28 | FileType GetFileType() override { |
| 31 | return IdentifyType(file); | 29 | return IdentifyType(file, filepath); |
| 32 | } | 30 | } |
| 33 | 31 | ||
| 34 | ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) override; | 32 | ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) override; |