mirror of https://github.com/PCSX2/pcsx2.git
IPC: add LoadState
This commit is contained in:
parent
e651147c53
commit
5153d9a198
|
@ -401,6 +401,16 @@ SocketIPC::IPCBuffer SocketIPC::ParseCommand(char* buf, char* ret_buffer, u32 bu
|
||||||
buf_cnt += 1;
|
buf_cnt += 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case MsgLoadState:
|
||||||
|
{
|
||||||
|
if (!m_vm->HasActiveMachine())
|
||||||
|
goto error;
|
||||||
|
if (!SafetyChecks(buf_cnt, 1, ret_cnt, 0, buf_size))
|
||||||
|
goto error;
|
||||||
|
StateCopy_LoadFromSlot(FromArray<u8>(&buf[buf_cnt], 0), false);
|
||||||
|
buf_cnt += 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
error:
|
error:
|
||||||
|
|
|
@ -93,6 +93,7 @@ protected:
|
||||||
MsgWrite64 = 7, /**< Write 64 bit value to memory. */
|
MsgWrite64 = 7, /**< Write 64 bit value to memory. */
|
||||||
MsgVersion = 8, /**< Returns PCSX2 version. */
|
MsgVersion = 8, /**< Returns PCSX2 version. */
|
||||||
MsgSaveState = 9, /**< Saves a savestate. */
|
MsgSaveState = 9, /**< Saves a savestate. */
|
||||||
|
MsgLoadState = 0xA, /**< Loads a savestate. */
|
||||||
MsgUnimplemented = 0xFF /**< Unimplemented IPC message. */
|
MsgUnimplemented = 0xFF /**< Unimplemented IPC message. */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue