From 86c74305e40b2ccd0a306965a5023ef8d4762e42 Mon Sep 17 00:00:00 2001 From: adelikat Date: Fri, 3 Feb 2017 16:31:38 -0600 Subject: [PATCH] lua console - when toggling a script on, behave the same as if you loaded it. It should run immediately, not on the next frame --- BizHawk.Client.Common/lua/LuaFile.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/BizHawk.Client.Common/lua/LuaFile.cs b/BizHawk.Client.Common/lua/LuaFile.cs index c03c2968c5..dfcfe73e0d 100644 --- a/BizHawk.Client.Common/lua/LuaFile.cs +++ b/BizHawk.Client.Common/lua/LuaFile.cs @@ -61,10 +61,18 @@ namespace BizHawk.Client.Common public void Toggle() { if (State == RunState.Paused) + { State = RunState.Running; + } else if (State == RunState.Disabled) + { State = RunState.Running; - else State = RunState.Disabled; + FrameWaiting = false; + } + else + { + State = RunState.Disabled; + } } public void TogglePause()