mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Added FRD service serialization
This commit is contained in:
		
							parent
							
								
									4354179156
								
							
						
					
					
						commit
						d1096de245
					
				
					 6 changed files with 44 additions and 2 deletions
				
			
		|  | @ -18,10 +18,28 @@ struct FriendKey { | |||
|     u32 friend_id; | ||||
|     u32 unknown; | ||||
|     u64 friend_code; | ||||
| 
 | ||||
| private: | ||||
|     template <class Archive> | ||||
|     void serialize(Archive& ar, const unsigned int) | ||||
|     { | ||||
|         ar & friend_id; | ||||
|         ar & unknown; | ||||
|         ar & friend_code; | ||||
|     } | ||||
|     friend class boost::serialization::access; | ||||
| }; | ||||
| 
 | ||||
| struct MyPresence { | ||||
|     u8 unknown[0x12C]; | ||||
| 
 | ||||
| private: | ||||
|     template <class Archive> | ||||
|     void serialize(Archive& ar, const unsigned int) | ||||
|     { | ||||
|         ar & unknown; | ||||
|     } | ||||
|     friend class boost::serialization::access; | ||||
| }; | ||||
| 
 | ||||
| struct Profile { | ||||
|  | @ -130,13 +148,21 @@ public: | |||
|          */ | ||||
|         void SetClientSdkVersion(Kernel::HLERequestContext& ctx); | ||||
| 
 | ||||
|     private: | ||||
|     protected: | ||||
|         std::shared_ptr<Module> frd; | ||||
|     }; | ||||
| 
 | ||||
| private: | ||||
|     FriendKey my_friend_key = {0, 0, 0ull}; | ||||
|     MyPresence my_presence = {}; | ||||
| 
 | ||||
|     template <class Archive> | ||||
|     void serialize(Archive& ar, const unsigned int) | ||||
|     { | ||||
|         ar & my_friend_key; | ||||
|         ar & my_presence; | ||||
|     } | ||||
|     friend class boost::serialization::access; | ||||
| }; | ||||
| 
 | ||||
| void InstallInterfaces(Core::System& system); | ||||
|  |  | |||
|  | @ -3,6 +3,9 @@ | |||
| // Refer to the license.txt file included.
 | ||||
| 
 | ||||
| #include "core/hle/service/frd/frd_a.h" | ||||
| #include "common/archives.h" | ||||
| 
 | ||||
| SERIALIZE_EXPORT_IMPL(Service::FRD::FRD_A) | ||||
| 
 | ||||
| namespace Service::FRD { | ||||
| 
 | ||||
|  |  | |||
|  | @ -11,6 +11,11 @@ namespace Service::FRD { | |||
| class FRD_A final : public Module::Interface { | ||||
| public: | ||||
|     explicit FRD_A(std::shared_ptr<Module> frd); | ||||
| private: | ||||
|     SERVICE_SERIALIZATION(FRD_A, frd, Module) | ||||
| }; | ||||
| 
 | ||||
| } // namespace Service::FRD
 | ||||
| 
 | ||||
| BOOST_CLASS_EXPORT_KEY(Service::FRD::FRD_A) | ||||
| BOOST_SERIALIZATION_CONSTRUCT(Service::FRD::FRD_A) | ||||
|  |  | |||
|  | @ -3,6 +3,9 @@ | |||
| // Refer to the license.txt file included.
 | ||||
| 
 | ||||
| #include "core/hle/service/frd/frd_u.h" | ||||
| #include "common/archives.h" | ||||
| 
 | ||||
| SERIALIZE_EXPORT_IMPL(Service::FRD::FRD_U) | ||||
| 
 | ||||
| namespace Service::FRD { | ||||
| 
 | ||||
|  |  | |||
|  | @ -11,6 +11,11 @@ namespace Service::FRD { | |||
| class FRD_U final : public Module::Interface { | ||||
| public: | ||||
|     explicit FRD_U(std::shared_ptr<Module> frd); | ||||
| private: | ||||
|     SERVICE_SERIALIZATION(FRD_U, frd, Module) | ||||
| }; | ||||
| 
 | ||||
| } // namespace Service::FRD
 | ||||
| 
 | ||||
| BOOST_CLASS_EXPORT_KEY(Service::FRD::FRD_U) | ||||
| BOOST_SERIALIZATION_CONSTRUCT(Service::FRD::FRD_U) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue