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

@ -3,9 +3,11 @@
// Refer to the license.txt file included.
#include <memory>
#include "common/archives.h"
#include "common/logging/log.h"
#include "core/settings.h"
#include "video_core/pica.h"
#include "video_core/pica_state.h"
#include "video_core/renderer_base.h"
#include "video_core/renderer_opengl/gl_vars.h"
#include "video_core/renderer_opengl/renderer_opengl.h"
@ -85,4 +87,18 @@ u16 GetResolutionScaleFactor() {
}
}
void Save(std::ostream &stream)
{
oarchive oa{stream};
oa & Pica::g_state;
}
void Load(std::istream &stream)
{
iarchive ia{stream};
ia & Pica::g_state;
// TODO: Flush/reset things
}
} // namespace VideoCore