summaryrefslogtreecommitdiff
path: root/src/core/loader/elf.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/elf.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/elf.h')
-rw-r--r--src/core/loader/elf.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/core/loader/elf.h b/src/core/loader/elf.h
index ee741a789..b8fb982d0 100644
--- a/src/core/loader/elf.h
+++ b/src/core/loader/elf.h
@@ -16,24 +16,20 @@ namespace Loader {
16/// Loads an ELF/AXF file 16/// Loads an ELF/AXF file
17class AppLoader_ELF final : public AppLoader { 17class AppLoader_ELF final : public AppLoader {
18public: 18public:
19 AppLoader_ELF(FileUtil::IOFile&& file, std::string filename); 19 explicit AppLoader_ELF(FileSys::VirtualFile file);
20 20
21 /** 21 /**
22 * Returns the type of the file 22 * Returns the type of the file
23 * @param file FileUtil::IOFile open file 23 * @param file std::shared_ptr<VfsFile> open file
24 * @param filepath Path of the file that we are opening.
25 * @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
26 */ 25 */
27 static FileType IdentifyType(FileUtil::IOFile& file, const std::string& filepath); 26 static FileType IdentifyType(const FileSys::VirtualFile& file);
28 27
29 FileType GetFileType() override { 28 FileType GetFileType() override {
30 return IdentifyType(file, filename); 29 return IdentifyType(file);
31 } 30 }
32 31
33 ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) override; 32 ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) override;
34
35private:
36 std::string filename;
37}; 33};
38 34
39} // namespace Loader 35} // namespace Loader