mirror of
				https://git.zaroz.cloud/nintendo-back-up/yuzu/yuzu-mainline.git
				synced 2025-03-21 01:53:15 +00:00 
			
		
		
		
	core: Make GetGameFileFromPath function externally accessible
This commit is contained in:
		
							parent
							
								
									c381f46428
								
							
						
					
					
						commit
						c7b41ade74
					
				| @ -8,6 +8,7 @@ | |||||||
| #include <thread> | #include <thread> | ||||||
| #include <utility> | #include <utility> | ||||||
| 
 | 
 | ||||||
|  | #include "common/file_util.h" | ||||||
| #include "common/logging/log.h" | #include "common/logging/log.h" | ||||||
| #include "common/string_util.h" | #include "common/string_util.h" | ||||||
| #include "core/arm/exclusive_monitor.h" | #include "core/arm/exclusive_monitor.h" | ||||||
| @ -40,7 +41,6 @@ namespace Core { | |||||||
| 
 | 
 | ||||||
| /*static*/ System System::s_instance; | /*static*/ System System::s_instance; | ||||||
| 
 | 
 | ||||||
| namespace { |  | ||||||
| FileSys::VirtualFile GetGameFileFromPath(const FileSys::VirtualFilesystem& vfs, | FileSys::VirtualFile GetGameFileFromPath(const FileSys::VirtualFilesystem& vfs, | ||||||
|                                          const std::string& path) { |                                          const std::string& path) { | ||||||
|     // To account for split 00+01+etc files.
 |     // To account for split 00+01+etc files.
 | ||||||
| @ -69,11 +69,13 @@ FileSys::VirtualFile GetGameFileFromPath(const FileSys::VirtualFilesystem& vfs, | |||||||
|         return FileSys::ConcatenatedVfsFile::MakeConcatenatedFile(concat, dir->GetName()); |         return FileSys::ConcatenatedVfsFile::MakeConcatenatedFile(concat, dir->GetName()); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     if (FileUtil::IsDirectory(path)) | ||||||
|  |         return vfs->OpenFile(path + "/" + "main", FileSys::Mode::Read); | ||||||
|  | 
 | ||||||
|     return vfs->OpenFile(path, FileSys::Mode::Read); |     return vfs->OpenFile(path, FileSys::Mode::Read); | ||||||
| } | } | ||||||
| } // Anonymous namespace
 |  | ||||||
| 
 |  | ||||||
| struct System::Impl { | struct System::Impl { | ||||||
|  | 
 | ||||||
|     Cpu& CurrentCpuCore() { |     Cpu& CurrentCpuCore() { | ||||||
|         return cpu_core_manager.GetCurrentCore(); |         return cpu_core_manager.GetCurrentCore(); | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -9,6 +9,7 @@ | |||||||
| #include <string> | #include <string> | ||||||
| 
 | 
 | ||||||
| #include "common/common_types.h" | #include "common/common_types.h" | ||||||
|  | #include "core/file_sys/vfs_types.h" | ||||||
| #include "core/hle/kernel/object.h" | #include "core/hle/kernel/object.h" | ||||||
| 
 | 
 | ||||||
| namespace Core::Frontend { | namespace Core::Frontend { | ||||||
| @ -55,6 +56,9 @@ class TelemetrySession; | |||||||
| 
 | 
 | ||||||
| struct PerfStatsResults; | struct PerfStatsResults; | ||||||
| 
 | 
 | ||||||
|  | FileSys::VirtualFile GetGameFileFromPath(const FileSys::VirtualFilesystem& vfs, | ||||||
|  |                                          const std::string& path); | ||||||
|  | 
 | ||||||
| class System { | class System { | ||||||
| public: | public: | ||||||
|     System(const System&) = delete; |     System(const System&) = delete; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Zach Hilman
						Zach Hilman