From aadd537699a219f8c0ccb17415ad1df301800bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ana=C3=AFs=20Betts?= Date: Sun, 9 Jan 2022 17:22:46 +0100 Subject: [PATCH] Start to sketch out our methods --- bsnes/target-bsnes/program/program.hpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/bsnes/target-bsnes/program/program.hpp b/bsnes/target-bsnes/program/program.hpp index f0b25cfb..04e18fc4 100644 --- a/bsnes/target-bsnes/program/program.hpp +++ b/bsnes/target-bsnes/program/program.hpp @@ -48,6 +48,11 @@ struct Program : Lock, Emulator::Platform { auto cheatPath() -> string; auto statePath() -> string; auto screenshotPath() -> string; + + // rpc + auto startRpcListener() -> void; + auto stopRpcListener() -> void; + auto processRpcCommands() -> void; //states.cpp struct State { @@ -206,6 +211,18 @@ public: };}; uint mute = 0; + // rpc.cpp + struct RpcCommandType { enum : uint { + SaveStateToFile = 1 << 1 + }; }; + + struct RpcCommand { + RpcCommandType type; + string arg; + }; + + vector pendingRpcCommands; + bool fastForwarding = false; bool rewinding = false; };