diff options
| author | 2018-07-18 21:07:11 -0400 | |
|---|---|---|
| committer | 2018-07-18 18:07:11 -0700 | |
| commit | 29aff8d5ab46c8d0199aa4bfa7eeff5d4fa2d7ef (patch) | |
| tree | 3202e2ce55ab6387a4ca366a509eccdd963434c3 /src/core/loader/nro.h | |
| parent | Merge pull request #683 from DarkLordZach/touch (diff) | |
| download | yuzu-29aff8d5ab46c8d0199aa4bfa7eeff5d4fa2d7ef.tar.gz yuzu-29aff8d5ab46c8d0199aa4bfa7eeff5d4fa2d7ef.tar.xz yuzu-29aff8d5ab46c8d0199aa4bfa7eeff5d4fa2d7ef.zip | |
Virtual Filesystem 2: Electric Boogaloo (#676)
* Virtual Filesystem
* Fix delete bug and documentate
* Review fixes + other stuff
* Fix puyo regression
Diffstat (limited to 'src/core/loader/nro.h')
| -rw-r--r-- | src/core/loader/nro.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/core/loader/nro.h b/src/core/loader/nro.h index 599adb253..2c03d06bb 100644 --- a/src/core/loader/nro.h +++ b/src/core/loader/nro.h | |||
| @@ -15,26 +15,23 @@ namespace Loader { | |||
| 15 | /// Loads an NRO file | 15 | /// Loads an NRO file |
| 16 | class AppLoader_NRO final : public AppLoader, Linker { | 16 | class AppLoader_NRO final : public AppLoader, Linker { |
| 17 | public: | 17 | public: |
| 18 | AppLoader_NRO(FileUtil::IOFile&& file, std::string filepath); | 18 | AppLoader_NRO(FileSys::VirtualFile file); |
| 19 | 19 | ||
| 20 | /** | 20 | /** |
| 21 | * Returns the type of the file | 21 | * Returns the type of the file |
| 22 | * @param file FileUtil::IOFile open file | 22 | * @param file std::shared_ptr<VfsFile> open file |
| 23 | * @param filepath Path of the file that we are opening. | ||
| 24 | * @return FileType found, or FileType::Error if this loader doesn't know it | 23 | * @return FileType found, or FileType::Error if this loader doesn't know it |
| 25 | */ | 24 | */ |
| 26 | static FileType IdentifyType(FileUtil::IOFile& file, const std::string& filepath); | 25 | static FileType IdentifyType(const FileSys::VirtualFile& file); |
| 27 | 26 | ||
| 28 | FileType GetFileType() override { | 27 | FileType GetFileType() override { |
| 29 | return IdentifyType(file, filepath); | 28 | return IdentifyType(file); |
| 30 | } | 29 | } |
| 31 | 30 | ||
| 32 | ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) override; | 31 | ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) override; |
| 33 | 32 | ||
| 34 | private: | 33 | private: |
| 35 | bool LoadNro(const std::string& path, VAddr load_base); | 34 | bool LoadNro(FileSys::VirtualFile file, VAddr load_base); |
| 36 | |||
| 37 | std::string filepath; | ||
| 38 | }; | 35 | }; |
| 39 | 36 | ||
| 40 | } // namespace Loader | 37 | } // namespace Loader |