diff options
author | bunnei <bunneidev@gmail.com> | 2018-01-20 16:26:20 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-20 16:26:20 -0500 |
commit | ff883cc56382425d4c4f572ff659ec7df6fc2cec (patch) | |
tree | 3b7e44f33dac0384d412fed61de3c5ad40db137d /src/core/loader/nso.h | |
parent | c8a094e164b77fdae6b4b8bff7f94b703c24c161 (diff) | |
parent | 386df282a3ad340ddaf7ab054102858406b27198 (diff) |
Merge pull request #119 from bunnei/desconstucted-loader
Separate NSO loading from DesconstuctedRomLoader
Diffstat (limited to 'src/core/loader/nso.h')
-rw-r--r-- | src/core/loader/nso.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/core/loader/nso.h b/src/core/loader/nso.h index a24bcdc24..1ae30a824 100644 --- a/src/core/loader/nso.h +++ b/src/core/loader/nso.h @@ -4,10 +4,8 @@ #pragma once -#include <map> #include <string> #include "common/common_types.h" -#include "common/file_util.h" #include "core/hle/kernel/kernel.h" #include "core/loader/linker.h" #include "core/loader/loader.h" @@ -17,25 +15,25 @@ namespace Loader { /// Loads an NSO file class AppLoader_NSO final : public AppLoader, Linker { public: - AppLoader_NSO(FileUtil::IOFile&& file, std::string filepath) - : AppLoader(std::move(file)), filepath(std::move(filepath)) {} + AppLoader_NSO(FileUtil::IOFile&& file, std::string filepath); /** * Returns the type of the file * @param file FileUtil::IOFile open file + * @param filepath Path of the file that we are opening. * @return FileType found, or FileType::Error if this loader doesn't know it */ - static FileType IdentifyType(FileUtil::IOFile& file); + static FileType IdentifyType(FileUtil::IOFile& file, const std::string& filepath); FileType GetFileType() override { - return IdentifyType(file); + return IdentifyType(file, filepath); } + static VAddr LoadModule(const std::string& path, VAddr load_base); + ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) override; private: - VAddr LoadNso(const std::string& path, VAddr load_base); - std::string filepath; }; |