MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / DoLoadState

Method DoLoadState

pcsx2/VMManager.cpp:1895–1917  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1893}
1894
1895bool VMManager::DoLoadState(const char* filename, Error* error)
1896{
1897 if (GSDumpReplayer::IsReplayingDump())
1898 {
1899 Error::SetString(error, TRANSLATE_STR("VMManager", "Cannot load state while replaying a GS dump."));
1900 return false;
1901 }
1902
1903 Host::OnSaveStateLoading(filename);
1904
1905 if (!SaveState_UnzipFromDisk(filename, error))
1906 return false;
1907
1908 Host::OnSaveStateLoaded(filename, true);
1909 if (g_InputRecording.isActive())
1910 {
1911 g_InputRecording.handleLoadingSavestate();
1912 MTGS::PresentCurrentFrame();
1913 }
1914
1915 MemcardBusy::CheckSaveStateDependency();
1916 return true;
1917}
1918
1919void VMManager::DoSaveState(const char* filename, s32 slot_for_message, bool zip_on_thread, bool backup_old_state, std::function<void(const std::string&)> error_callback)
1920{

Callers

nothing calls this directly

Calls 3

SaveState_UnzipFromDiskFunction · 0.85
isActiveMethod · 0.80

Tested by

no test coverage detected