Add ClearAll to rasterizer cache for fully wiping the cache on save/load

This commit is contained in:
James Rowe 2020-01-16 23:17:55 -07:00 committed by zhupengfei
parent 3e34ad6890
commit 55c75b5e3e
9 changed files with 57 additions and 4 deletions

View file

@ -437,7 +437,9 @@ void System::Reset() {
template <class Archive>
void System::serialize(Archive& ar, const unsigned int file_version) {
Memory::RasterizerFlushAndInvalidateRegion(0, 0xFFFFFFFF);
// flush on save, don't flush on load
bool should_flush = !Archive::is_loading::value;
Memory::RasterizerClearAll(should_flush);
ar&* timing.get();
ar&* cpu_core.get();
ar&* service_manager.get();