Skip to content

Commit 5eb2cd8

Browse files
committed
Send ext. tools regular update events while emulation is paused
resolves #3626
1 parent 0f19b9c commit 5eb2cd8

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/BizHawk.Client.EmuHawk/MainForm.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,10 +881,13 @@ public int ProgramRunLoop()
881881
// autohold/autofire must not be affected by the following inputs
882882
InputManager.ActiveController.Overrides(InputManager.ButtonOverrideAdapter);
883883

884+
// emu.yield()'ing scripts
884885
if (Tools.Has<LuaConsole>())
885886
{
886887
Tools.LuaConsole.ResumeScripts(false);
887888
}
889+
// ext. tools don't yield per se, so just send them a GeneralUpdate
890+
Tools.GeneralUpdateActiveExtTools();
888891

889892
StepRunLoop_Core();
890893
Render();

src/BizHawk.Client.EmuHawk/tools/ToolManager.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,14 @@ public void UpdateValues<T>() where T : IToolForm
580580
}
581581
}
582582

583+
public void GeneralUpdateActiveExtTools()
584+
{
585+
foreach (var tool in _tools.ToArray())
586+
{
587+
if (tool is IExternalToolForm { IsActive: true }) tool.UpdateValues(ToolFormUpdateType.General);
588+
}
589+
}
590+
583591
public void Restart(Config config, IEmulator emulator, IGameInfo game)
584592
{
585593
_config = config;

0 commit comments

Comments
 (0)