forked from eden-emu/eden
		
	Sources: Run clang-format on everything.
This commit is contained in:
		
							parent
							
								
									fe948af095
								
							
						
					
					
						commit
						dc8479928c
					
				
					 386 changed files with 19560 additions and 18080 deletions
				
			
		|  | @ -30,10 +30,11 @@ std::string GetExtSaveDataPath(const std::string& mount_point, const Path& path) | |||
| 
 | ||||
| std::string GetExtDataContainerPath(const std::string& mount_point, bool shared) { | ||||
|     if (shared) | ||||
|         return Common::StringFromFormat("%sdata/%s/extdata/", mount_point.c_str(), SYSTEM_ID.c_str()); | ||||
|         return Common::StringFromFormat("%sdata/%s/extdata/", mount_point.c_str(), | ||||
|                                         SYSTEM_ID.c_str()); | ||||
| 
 | ||||
|     return Common::StringFromFormat("%sNintendo 3DS/%s/%s/extdata/", mount_point.c_str(), | ||||
|             SYSTEM_ID.c_str(), SDCARD_ID.c_str()); | ||||
|                                     SYSTEM_ID.c_str(), SDCARD_ID.c_str()); | ||||
| } | ||||
| 
 | ||||
| Path ConstructExtDataBinaryPath(u32 media_type, u32 high, u32 low) { | ||||
|  | @ -54,11 +55,12 @@ Path ConstructExtDataBinaryPath(u32 media_type, u32 high, u32 low) { | |||
|     for (unsigned i = 0; i < 4; ++i) | ||||
|         binary_path.push_back((high >> (8 * i)) & 0xFF); | ||||
| 
 | ||||
|     return { binary_path }; | ||||
|     return {binary_path}; | ||||
| } | ||||
| 
 | ||||
| ArchiveFactory_ExtSaveData::ArchiveFactory_ExtSaveData(const std::string& mount_location, bool shared) | ||||
|         : shared(shared), mount_point(GetExtDataContainerPath(mount_location, shared)) { | ||||
| ArchiveFactory_ExtSaveData::ArchiveFactory_ExtSaveData(const std::string& mount_location, | ||||
|                                                        bool shared) | ||||
|     : shared(shared), mount_point(GetExtDataContainerPath(mount_location, shared)) { | ||||
|     LOG_INFO(Service_FS, "Directory %s set as base for ExtSaveData.", mount_point.c_str()); | ||||
| } | ||||
| 
 | ||||
|  | @ -88,7 +90,8 @@ ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_ExtSaveData::Open(cons | |||
|     return MakeResult<std::unique_ptr<ArchiveBackend>>(std::move(archive)); | ||||
| } | ||||
| 
 | ||||
| ResultCode ArchiveFactory_ExtSaveData::Format(const Path& path, const FileSys::ArchiveFormatInfo& format_info) { | ||||
| ResultCode ArchiveFactory_ExtSaveData::Format(const Path& path, | ||||
|                                               const FileSys::ArchiveFormatInfo& format_info) { | ||||
|     // These folders are always created with the ExtSaveData
 | ||||
|     std::string user_path = GetExtSaveDataPath(mount_point, path) + "user/"; | ||||
|     std::string boss_path = GetExtSaveDataPath(mount_point, path) + "boss/"; | ||||
|  | @ -115,7 +118,8 @@ ResultVal<ArchiveFormatInfo> ArchiveFactory_ExtSaveData::GetFormatInfo(const Pat | |||
|     if (!file.IsOpen()) { | ||||
|         LOG_ERROR(Service_FS, "Could not open metadata information for archive"); | ||||
|         // TODO(Subv): Verify error code
 | ||||
|         return ResultCode(ErrorDescription::FS_NotFormatted, ErrorModule::FS, ErrorSummary::InvalidState, ErrorLevel::Status); | ||||
|         return ResultCode(ErrorDescription::FS_NotFormatted, ErrorModule::FS, | ||||
|                           ErrorSummary::InvalidState, ErrorLevel::Status); | ||||
|     } | ||||
| 
 | ||||
|     ArchiveFormatInfo info = {}; | ||||
|  | @ -123,7 +127,8 @@ ResultVal<ArchiveFormatInfo> ArchiveFactory_ExtSaveData::GetFormatInfo(const Pat | |||
|     return MakeResult<ArchiveFormatInfo>(info); | ||||
| } | ||||
| 
 | ||||
| void ArchiveFactory_ExtSaveData::WriteIcon(const Path& path, const u8* icon_data, size_t icon_size) { | ||||
| void ArchiveFactory_ExtSaveData::WriteIcon(const Path& path, const u8* icon_data, | ||||
|                                            size_t icon_size) { | ||||
|     std::string game_path = FileSys::GetExtSaveDataPath(GetMountPoint(), path); | ||||
|     FileUtil::IOFile icon_file(game_path + "icon", "wb"); | ||||
|     icon_file.WriteBytes(icon_data, icon_size); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Emmanuel Gil Peyrot
						Emmanuel Gil Peyrot