mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	citra_android: Storage Access Framework implementation (#6313)
This commit is contained in:
		
							parent
							
								
									8c12eb4905
								
							
						
					
					
						commit
						8d563d37b4
					
				
					 68 changed files with 1972 additions and 545 deletions
				
			
		|  | @ -477,7 +477,7 @@ endif() | |||
| create_target_directory_groups(core) | ||||
| 
 | ||||
| target_link_libraries(core PUBLIC common PRIVATE audio_core network video_core) | ||||
| target_link_libraries(core PUBLIC Boost::boost PRIVATE cryptopp fmt::fmt open_source_archives Boost::serialization) | ||||
| target_link_libraries(core PUBLIC Boost::boost PRIVATE cryptopp fmt::fmt open_source_archives Boost::serialization Boost::iostreams) | ||||
| set_target_properties(core PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${ENABLE_LTO}) | ||||
| 
 | ||||
| if (ENABLE_WEB_SERVICE) | ||||
|  |  | |||
|  | @ -71,16 +71,12 @@ void CheatEngine::SaveCheatFile() const { | |||
|     if (!FileUtil::IsDirectory(cheat_dir)) { | ||||
|         FileUtil::CreateDir(cheat_dir); | ||||
|     } | ||||
| 
 | ||||
|     std::ofstream file; | ||||
|     OpenFStream(file, filepath, std::ios_base::out); | ||||
|     FileUtil::IOFile file(filepath, "w"); | ||||
| 
 | ||||
|     auto cheats = GetCheats(); | ||||
|     for (const auto& cheat : cheats) { | ||||
|         file << cheat->ToString(); | ||||
|         file.WriteString(cheat->ToString()); | ||||
|     } | ||||
| 
 | ||||
|     file.flush(); | ||||
| } | ||||
| 
 | ||||
| void CheatEngine::LoadCheatFile() { | ||||
|  |  | |||
|  | @ -8,6 +8,8 @@ | |||
| #include <functional> | ||||
| #include <string> | ||||
| #include <vector> | ||||
| #include <boost/iostreams/device/file_descriptor.hpp> | ||||
| #include <boost/iostreams/stream.hpp> | ||||
| #include "common/file_util.h" | ||||
| #include "common/logging/log.h" | ||||
| #include "common/string_util.h" | ||||
|  | @ -473,9 +475,9 @@ std::string GatewayCheat::ToString() const { | |||
| std::vector<std::unique_ptr<CheatBase>> GatewayCheat::LoadFile(const std::string& filepath) { | ||||
|     std::vector<std::unique_ptr<CheatBase>> cheats; | ||||
| 
 | ||||
|     std::ifstream file; | ||||
|     OpenFStream(file, filepath, std::ios_base::in); | ||||
|     if (!file) { | ||||
|     boost::iostreams::stream<boost::iostreams::file_descriptor_source> file; | ||||
|     FileUtil::OpenFStream<std::ios_base::in>(file, filepath); | ||||
|     if (!file.is_open()) { | ||||
|         return cheats; | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -6,6 +6,8 @@ | |||
| #include <exception> | ||||
| #include <optional> | ||||
| #include <sstream> | ||||
| #include <boost/iostreams/device/file_descriptor.hpp> | ||||
| #include <boost/iostreams/stream.hpp> | ||||
| #include <cryptopp/aes.h> | ||||
| #include <cryptopp/modes.h> | ||||
| #include <cryptopp/sha.h> | ||||
|  | @ -428,9 +430,10 @@ void LoadNativeFirmKeysNew3DS() { | |||
| void LoadPresetKeys() { | ||||
|     const std::string filepath = FileUtil::GetUserPath(FileUtil::UserPath::SysDataDir) + AES_KEYS; | ||||
|     FileUtil::CreateFullPath(filepath); // Create path if not already created
 | ||||
|     std::ifstream file; | ||||
|     OpenFStream(file, filepath, std::ios_base::in); | ||||
|     if (!file) { | ||||
| 
 | ||||
|     boost::iostreams::stream<boost::iostreams::file_descriptor_source> file; | ||||
|     FileUtil::OpenFStream<std::ios_base::in>(file, filepath); | ||||
|     if (!file.is_open()) { | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue