forked from eden-emu/eden
		
	fspsrv: Implement DisableAutoSaveDataCreation (#6355)
- Used by Mii Edit
This commit is contained in:
		
							parent
							
								
									4ea171fa5e
								
							
						
					
					
						commit
						c4c256f56a
					
				
					 6 changed files with 25 additions and 2 deletions
				
			
		|  | @ -105,7 +105,7 @@ ResultVal<VirtualDir> SaveDataFactory::Open(SaveDataSpaceId space, | |||
| 
 | ||||
|     auto out = dir->GetDirectoryRelative(save_directory); | ||||
| 
 | ||||
|     if (out == nullptr && ShouldSaveDataBeAutomaticallyCreated(space, meta)) { | ||||
|     if (out == nullptr && (ShouldSaveDataBeAutomaticallyCreated(space, meta) && auto_create)) { | ||||
|         return Create(space, meta); | ||||
|     } | ||||
| 
 | ||||
|  | @ -199,4 +199,8 @@ void SaveDataFactory::WriteSaveDataSize(SaveDataType type, u64 title_id, u128 us | |||
|     size_file->WriteObject(new_value); | ||||
| } | ||||
| 
 | ||||
| void SaveDataFactory::SetAutoCreate(bool state) { | ||||
|     auto_create = state; | ||||
| } | ||||
| 
 | ||||
| } // namespace FileSys
 | ||||
|  |  | |||
|  | @ -104,9 +104,12 @@ public: | |||
|     void WriteSaveDataSize(SaveDataType type, u64 title_id, u128 user_id, | ||||
|                            SaveDataSize new_value) const; | ||||
| 
 | ||||
|     void SetAutoCreate(bool state); | ||||
| 
 | ||||
| private: | ||||
|     VirtualDir dir; | ||||
|     Core::System& system; | ||||
|     bool auto_create{true}; | ||||
| }; | ||||
| 
 | ||||
| } // namespace FileSys
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Chloe
						Chloe