citra-emu
/
citra-canary
Archived
1
0
Fork 0

savestates: log slot on load and save

This commit is contained in:
Vitor Kiguchi 2023-04-05 14:50:51 -03:00
parent 7b8832cebb
commit 8e8c8fa37a
1 changed files with 6 additions and 4 deletions

View File

@ -113,9 +113,10 @@ System::ResultStatus System::RunLoop(bool tight_loop) {
case Signal::Shutdown: case Signal::Shutdown:
return ResultStatus::ShutdownRequested; return ResultStatus::ShutdownRequested;
case Signal::Load: { case Signal::Load: {
LOG_INFO(Core, "Begin load"); const u32 slot = param;
LOG_INFO(Core, "Begin load of slot {}", slot);
try { try {
System::LoadState(param); System::LoadState(slot);
LOG_INFO(Core, "Load completed"); LOG_INFO(Core, "Load completed");
} catch (const std::exception& e) { } catch (const std::exception& e) {
LOG_ERROR(Core, "Error loading: {}", e.what()); LOG_ERROR(Core, "Error loading: {}", e.what());
@ -126,9 +127,10 @@ System::ResultStatus System::RunLoop(bool tight_loop) {
return ResultStatus::Success; return ResultStatus::Success;
} }
case Signal::Save: { case Signal::Save: {
LOG_INFO(Core, "Begin save"); const u32 slot = param;
LOG_INFO(Core, "Begin save to slot {}", slot);
try { try {
System::SaveState(param); System::SaveState(slot);
LOG_INFO(Core, "Save completed"); LOG_INFO(Core, "Save completed");
} catch (const std::exception& e) { } catch (const std::exception& e) {
LOG_ERROR(Core, "Error saving: {}", e.what()); LOG_ERROR(Core, "Error saving: {}", e.what());