mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	Loader: Add a GetFileType method to get the type of a loaded file
This commit is contained in:
		
							parent
							
								
									8fc9c03126
								
							
						
					
					
						commit
						9a35d1fb4a
					
				
					 4 changed files with 30 additions and 0 deletions
				
			
		|  | @ -27,6 +27,14 @@ public: | ||||||
|      */ |      */ | ||||||
|     static FileType IdentifyType(FileUtil::IOFile& file); |     static FileType IdentifyType(FileUtil::IOFile& file); | ||||||
| 
 | 
 | ||||||
|  |     /**
 | ||||||
|  |      * Returns the type of this file | ||||||
|  |      * @return FileType corresponding to the loaded file | ||||||
|  |      */ | ||||||
|  |     FileType GetFileType() override { | ||||||
|  |         return IdentifyType(file); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     /**
 |     /**
 | ||||||
|      * Load the bootable file |      * Load the bootable file | ||||||
|      * @return ResultStatus result of function |      * @return ResultStatus result of function | ||||||
|  |  | ||||||
|  | @ -27,6 +27,14 @@ public: | ||||||
|      */ |      */ | ||||||
|     static FileType IdentifyType(FileUtil::IOFile& file); |     static FileType IdentifyType(FileUtil::IOFile& file); | ||||||
| 
 | 
 | ||||||
|  |     /**
 | ||||||
|  |      * Returns the type of this file | ||||||
|  |      * @return FileType corresponding to the loaded file | ||||||
|  |      */ | ||||||
|  |     FileType GetFileType() override { | ||||||
|  |         return IdentifyType(file); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     /**
 |     /**
 | ||||||
|      * Load the bootable file |      * Load the bootable file | ||||||
|      * @return ResultStatus result of function |      * @return ResultStatus result of function | ||||||
|  |  | ||||||
|  | @ -131,6 +131,12 @@ public: | ||||||
|     AppLoader(FileUtil::IOFile&& file) : file(std::move(file)) { } |     AppLoader(FileUtil::IOFile&& file) : file(std::move(file)) { } | ||||||
|     virtual ~AppLoader() { } |     virtual ~AppLoader() { } | ||||||
| 
 | 
 | ||||||
|  |     /**
 | ||||||
|  |      * Returns the type of this file | ||||||
|  |      * @return FileType corresponding to the loaded file | ||||||
|  |      */ | ||||||
|  |     virtual FileType GetFileType() = 0; | ||||||
|  | 
 | ||||||
|     /**
 |     /**
 | ||||||
|      * Load the application |      * Load the application | ||||||
|      * @return ResultStatus result of function |      * @return ResultStatus result of function | ||||||
|  |  | ||||||
|  | @ -173,6 +173,14 @@ public: | ||||||
|      */ |      */ | ||||||
|     static FileType IdentifyType(FileUtil::IOFile& file); |     static FileType IdentifyType(FileUtil::IOFile& file); | ||||||
| 
 | 
 | ||||||
|  |     /**
 | ||||||
|  |      * Returns the type of this file | ||||||
|  |      * @return FileType corresponding to the loaded file | ||||||
|  |      */ | ||||||
|  |     FileType GetFileType() override { | ||||||
|  |         return IdentifyType(file); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     /**
 |     /**
 | ||||||
|      * Load the application |      * Load the application | ||||||
|      * @return ResultStatus result of function |      * @return ResultStatus result of function | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue