Fixed file services serialization

This commit is contained in:
Hamish Milne 2020-01-16 00:53:20 +00:00 committed by zhupengfei
parent c24ea0f0ee
commit 2217b3558d
6 changed files with 26 additions and 14 deletions

View file

@ -113,12 +113,16 @@ System::ResultStatus System::RunLoop(bool tight_loop) {
return ResultStatus::ShutdownRequested;
break;
case Signal::Load: {
LOG_INFO(Core, "Begin load");
auto stream = std::ifstream("save0.citrasave", std::fstream::binary);
System::Load(stream);
LOG_INFO(Core, "Load completed");
} break;
case Signal::Save: {
LOG_INFO(Core, "Begin save");
auto stream = std::ofstream("save0.citrasave", std::fstream::binary);
System::Save(stream);
LOG_INFO(Core, "Save completed");
} break;
default:
break;