video_core serialization

This commit is contained in:
Hamish Milne 2019-08-07 17:08:52 +01:00 committed by zhupengfei
parent ee2cae2093
commit 6f00976ab5
9 changed files with 142 additions and 21 deletions

View file

@ -397,22 +397,28 @@ void System::Reset() {
template<class Archive>
void System::serialize(Archive & ar, const unsigned int file_version)
{
ar & memory;
ar & GPU::g_regs;
ar & LCD::g_regs;
ar & dsp_core->GetDspMemory();
ar & memory;
}
void System::Save(std::ostream &stream) const
{
boost::archive::binary_oarchive oa{stream};
oa & *this;
{
oarchive oa{stream};
oa & *this;
}
VideoCore::Save(stream);
}
void System::Load(std::istream &stream)
{
boost::archive::binary_iarchive ia{stream};
ia & *this;
{
iarchive ia{stream};
ia & *this;
}
VideoCore::Load(stream);
}
} // namespace Core