void CPS2VM::LoadVMState(const char* sPath, unsigned int& result) { if(m_ee->m_gs == NULL) { printf("PS2VM: GS Handler was not instancied. Cannot load state.\r\n"); result = 1; return; } try { Framework::CStdStream stateStream(sPath, "rb"); Framework::CZipArchiveReader archive(stateStream); try { m_ee->LoadState(archive); m_iop->LoadState(archive); m_ee->m_gs->LoadState(archive); m_iopOs->GetPadman()->LoadState(archive); } catch(...) { //Any error that occurs in the previous block is critical PauseImpl(); throw; } } catch(...) { result = 1; return; } printf("PS2VM: Loaded state from file '%s'.\r\n", sPath); OnMachineStateChange(); result = 0; }
void Argon::Thread::Pause() { PauseImpl(); }