summaryrefslogtreecommitdiff
path: root/src/core/loader/nso.h
diff options
context:
space:
mode:
authorGravatar bunnei2018-01-20 14:55:54 -0500
committerGravatar bunnei2018-01-20 14:59:44 -0500
commit023aef053c96c92c9ea15d067f7d2cb7150585d6 (patch)
tree6b8a4c0dc9aae92ff172a2715969b8551e9d14b1 /src/core/loader/nso.h
parentnso: Remove code specific to directory loading. (diff)
downloadyuzu-023aef053c96c92c9ea15d067f7d2cb7150585d6.tar.gz
yuzu-023aef053c96c92c9ea15d067f7d2cb7150585d6.tar.xz
yuzu-023aef053c96c92c9ea15d067f7d2cb7150585d6.zip
loader: Refactor to also pass filepath into IdentifyType.
Diffstat (limited to 'src/core/loader/nso.h')
-rw-r--r--src/core/loader/nso.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/loader/nso.h b/src/core/loader/nso.h
index 44d6dbbd9..f6a2b214f 100644
--- a/src/core/loader/nso.h
+++ b/src/core/loader/nso.h
@@ -4,7 +4,6 @@
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" 9#include "common/file_util.h"
@@ -23,12 +22,13 @@ public:
23 /** 22 /**
24 * Returns the type of the file 23 * Returns the type of the file
25 * @param file FileUtil::IOFile open file 24 * @param file FileUtil::IOFile open file
25 * @param filepath Path of the file that we are opening.
26 * @return FileType found, or FileType::Error if this loader doesn't know it 26 * @return FileType found, or FileType::Error if this loader doesn't know it
27 */ 27 */
28 static FileType IdentifyType(FileUtil::IOFile& file); 28 static FileType IdentifyType(FileUtil::IOFile& file, const std::string& filepath);
29 29
30 FileType GetFileType() override { 30 FileType GetFileType() override {
31 return IdentifyType(file); 31 return IdentifyType(file, filepath);
32 } 32 }
33 33
34 static VAddr LoadModule(const std::string& path, VAddr load_base); 34 static VAddr LoadModule(const std::string& path, VAddr load_base);
@@ -36,7 +36,6 @@ public:
36 ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) override; 36 ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) override;
37 37
38private: 38private:
39
40 std::string filepath; 39 std::string filepath;
41}; 40};
42 41