From 26bf304f4c25557287af7c33324ec854bd4fafe1 Mon Sep 17 00:00:00 2001 From: Rix Date: Mon, 5 Oct 2026 13:46:16 -0700 Subject: [PATCH] Document when PCSX.loadSaveState takes effect --- docs/Lua/redux-basics.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/Lua/redux-basics.md b/docs/Lua/redux-basics.md index f8da9a36..cc5052f0 100644 --- a/docs/Lua/redux-basics.md +++ b/docs/Lua/redux-basics.md @@ -94,6 +94,8 @@ It's also possible to manipulate savestates using the following functions: - `PCSX.loadSaveState(slice)` - `PCSX.loadSaveState(file)` +When called while the emulated CPU is running, for instance from a `GPU::Vsync` listener or a breakpoint callback, `PCSX.loadSaveState` doesn't load the state right away. The current CPU step finishes against the old state, and the load happens as soon as the CPU loop returns, before any further instruction is executed. Listen to the `ExecutionFlow::SaveStateLoaded` event to know when it happened. When the emulator is paused, the load is immediate. + Additionally, the following function returns a string containing the .proto file used to serialize the savestate: - `PCSX.getSaveStateProtoSchema()`