mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-11-03 23:28:48 +00:00 
			
		
		
		
	FileSys: Implement OtherSaveData
This commit is contained in:
		
							parent
							
								
									b25f19ac26
								
							
						
					
					
						commit
						589b642790
					
				
					 7 changed files with 214 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -22,6 +22,7 @@ enum class ErrorDescription : u32 {
 | 
			
		|||
    FS_ArchiveNotMounted = 101,
 | 
			
		||||
    FS_FileNotFound = 112,
 | 
			
		||||
    FS_PathNotFound = 113,
 | 
			
		||||
    FS_GameCardNotInserted = 141,
 | 
			
		||||
    FS_NotFound = 120,
 | 
			
		||||
    FS_FileAlreadyExists = 180,
 | 
			
		||||
    FS_DirectoryAlreadyExists = 185,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,6 +16,7 @@
 | 
			
		|||
#include "core/file_sys/archive_backend.h"
 | 
			
		||||
#include "core/file_sys/archive_extsavedata.h"
 | 
			
		||||
#include "core/file_sys/archive_ncch.h"
 | 
			
		||||
#include "core/file_sys/archive_other_savedata.h"
 | 
			
		||||
#include "core/file_sys/archive_savedata.h"
 | 
			
		||||
#include "core/file_sys/archive_sdmc.h"
 | 
			
		||||
#include "core/file_sys/archive_sdmcwriteonly.h"
 | 
			
		||||
| 
						 | 
				
			
			@ -538,6 +539,14 @@ void RegisterArchiveTypes() {
 | 
			
		|||
    auto sd_savedata_source = std::make_shared<FileSys::ArchiveSource_SDSaveData>(sdmc_directory);
 | 
			
		||||
    auto savedata_factory = std::make_unique<FileSys::ArchiveFactory_SaveData>(sd_savedata_source);
 | 
			
		||||
    RegisterArchiveType(std::move(savedata_factory), ArchiveIdCode::SaveData);
 | 
			
		||||
    auto other_savedata_permitted_factory =
 | 
			
		||||
        std::make_unique<FileSys::ArchiveFactory_OtherSaveDataPermitted>(sd_savedata_source);
 | 
			
		||||
    RegisterArchiveType(std::move(other_savedata_permitted_factory),
 | 
			
		||||
                        ArchiveIdCode::OtherSaveDataPermitted);
 | 
			
		||||
    auto other_savedata_general_factory =
 | 
			
		||||
        std::make_unique<FileSys::ArchiveFactory_OtherSaveDataGeneral>(sd_savedata_source);
 | 
			
		||||
    RegisterArchiveType(std::move(other_savedata_general_factory),
 | 
			
		||||
                        ArchiveIdCode::OtherSaveDataGeneral);
 | 
			
		||||
 | 
			
		||||
    auto extsavedata_factory =
 | 
			
		||||
        std::make_unique<FileSys::ArchiveFactory_ExtSaveData>(sdmc_directory, false);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -34,6 +34,8 @@ enum class ArchiveIdCode : u32 {
 | 
			
		|||
    SDMC = 0x00000009,
 | 
			
		||||
    SDMCWriteOnly = 0x0000000A,
 | 
			
		||||
    NCCH = 0x2345678A,
 | 
			
		||||
    OtherSaveDataGeneral = 0x567890B2,
 | 
			
		||||
    OtherSaveDataPermitted = 0x567890B4,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/// Media types for the archives
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue