summaryrefslogtreecommitdiff
path: root/src/core/loader/nso.h
diff options
context:
space:
mode:
authorGravatar bunnei2018-07-07 20:24:51 -0700
committerGravatar bunnei2018-07-07 20:24:51 -0700
commit913896cbd99e414c325c9d47a987376ed6d9fffd (patch)
treeb660920a49f538f0ee00486c50a0d153d53c423d /src/core/loader/nso.h
parentMerge pull request #632 from FearlessTobi/add-discord-link (diff)
downloadyuzu-913896cbd99e414c325c9d47a987376ed6d9fffd.tar.gz
yuzu-913896cbd99e414c325c9d47a987376ed6d9fffd.tar.xz
yuzu-913896cbd99e414c325c9d47a987376ed6d9fffd.zip
Revert "Virtual Filesystem (#597)"
This reverts commit 77c684c1140f6bf3fb7d4560d06d2efb1a2ee5e2.
Diffstat (limited to 'src/core/loader/nso.h')
-rw-r--r--src/core/loader/nso.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/core/loader/nso.h b/src/core/loader/nso.h
index 3f7567500..386f4d39a 100644
--- a/src/core/loader/nso.h
+++ b/src/core/loader/nso.h
@@ -15,22 +15,29 @@ namespace Loader {
15/// Loads an NSO file 15/// Loads an NSO file
16class AppLoader_NSO final : public AppLoader, Linker { 16class AppLoader_NSO final : public AppLoader, Linker {
17public: 17public:
18 explicit AppLoader_NSO(FileSys::VirtualFile file); 18 AppLoader_NSO(FileUtil::IOFile&& file, std::string filepath);
19 19
20 /** 20 /**
21 * Returns the type of the file 21 * Returns the type of the file
22 * @param file std::shared_ptr<VfsFile> open file 22 * @param file FileUtil::IOFile open file
23 * @param filepath Path of the file that we are opening.
23 * @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
24 */ 25 */
25 static FileType IdentifyType(const FileSys::VirtualFile& file); 26 static FileType IdentifyType(FileUtil::IOFile& file, const std::string& filepath);
26 27
27 FileType GetFileType() override { 28 FileType GetFileType() override {
28 return IdentifyType(file); 29 return IdentifyType(file, filepath);
29 } 30 }
30 31
31 static VAddr LoadModule(FileSys::VirtualFile file, VAddr load_base); 32 static VAddr LoadModule(const std::string& name, const std::vector<u8>& file_data,
33 VAddr load_base);
34
35 static VAddr LoadModule(const std::string& path, VAddr load_base);
32 36
33 ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) override; 37 ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) override;
38
39private:
40 std::string filepath;
34}; 41};
35 42
36} // namespace Loader 43} // namespace Loader