summaryrefslogtreecommitdiff
path: root/src/core/loader/nro.h
diff options
context:
space:
mode:
authorGravatar Zach Hilman2018-07-06 10:51:32 -0400
committerGravatar bunnei2018-07-06 10:51:32 -0400
commit77c684c1140f6bf3fb7d4560d06d2efb1a2ee5e2 (patch)
tree38ef6451732c5eecb0efdd198f3db4d33848453c /src/core/loader/nro.h
parentMerge pull request #629 from Subv/depth_test (diff)
downloadyuzu-77c684c1140f6bf3fb7d4560d06d2efb1a2ee5e2.tar.gz
yuzu-77c684c1140f6bf3fb7d4560d06d2efb1a2ee5e2.tar.xz
yuzu-77c684c1140f6bf3fb7d4560d06d2efb1a2ee5e2.zip
Virtual Filesystem (#597)
* Add VfsFile and VfsDirectory classes * Finish abstract Vfs classes * Implement RealVfsFile (computer fs backend) * Finish RealVfsFile and RealVfsDirectory * Finished OffsetVfsFile * More changes * Fix import paths * Major refactor * Remove double const * Use experimental/filesystem or filesystem depending on compiler * Port partition_filesystem * More changes * More Overhaul * FSP_SRV fixes * Fixes and testing * Try to get filesystem to compile * Filesystem on linux * Remove std::filesystem and document/test * Compile fixes * Missing include * Bug fixes * Fixes * Rename v_file and v_dir * clang-format fix * Rename NGLOG_* to LOG_* * Most review changes * Fix TODO * Guess 'main' to be Directory by filename
Diffstat (limited to 'src/core/loader/nro.h')
-rw-r--r--src/core/loader/nro.h13
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
16class AppLoader_NRO final : public AppLoader, Linker { 16class AppLoader_NRO final : public AppLoader, Linker {
17public: 17public:
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
34private: 33private:
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