diff --git a/src/core/hle/service/http_c.h b/src/core/hle/service/http_c.h index d94b47a45..490e06648 100644 --- a/src/core/hle/service/http_c.h +++ b/src/core/hle/service/http_c.h @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -215,24 +216,6 @@ public: #ifdef ENABLE_WEB_SERVICE httplib::Response response; #endif - -private: - template - void serialize(Archive& ar, const unsigned int) { - ar& handle; - ar& session_id; - ar& url; - ar& method; - ar& state; - ar& proxy; - ar& basic_auth; - ar& ssl_config; - ar& socket_buffer_size; - ar& headers; - ar& post_data; - } - friend class boost::serialization::access; - }; struct SessionData : public Kernel::SessionRequestHandler::SessionDataBase { @@ -453,10 +436,18 @@ private: private: template void serialize(Archive& ar, const unsigned int) { + // NOTE: Serialization of the HTTP service is on a 'best effort' basis. + // There is a very good chance that saving/loading during a network connection will break, + // regardless! ar& boost::serialization::base_object(*this); ar& ClCertA.certificate; ar& ClCertA.private_key; ar& ClCertA.init; + ar& context_counter; + ar& client_certs_counter; + ar& client_certs; + // NOTE: `contexts` is not serialized because it contains non-serializable data. (i.e. + // handles to ongoing HTTP requests.) Serializing across HTTP contexts will break. } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/mic_u.cpp b/src/core/hle/service/mic_u.cpp index bd324ada2..08ef5473f 100644 --- a/src/core/hle/service/mic_u.cpp +++ b/src/core/hle/service/mic_u.cpp @@ -110,6 +110,7 @@ struct State { private: template void serialize(Archive& ar, const unsigned int) { + ar& memory_ref; ar& sharedmem_size; ar& size; ar& offset; @@ -139,6 +140,7 @@ struct MIC_U::Impl { if (shared_memory) { shared_memory->SetName("MIC_U:shared_memory"); + state.memory_ref = shared_memory; state.sharedmem_buffer = shared_memory->GetPointer(); state.sharedmem_size = size; } diff --git a/src/video_core/primitive_assembly.h b/src/video_core/primitive_assembly.h index d6547dddd..404bc5316 100644 --- a/src/video_core/primitive_assembly.h +++ b/src/video_core/primitive_assembly.h @@ -5,10 +5,8 @@ #pragma once #include +#include #include "video_core/regs_pipeline.h" -namespace boost::serialization { -class access; -} namespace Pica {