Send ext. tools regular update events while emulation is paused

resolves #3626
This commit is contained in:
YoshiRulz 2024-09-14 21:42:22 +10:00
parent 0f19b9c854
commit 5eb2cd8cb1
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 11 additions and 0 deletions

View File

@ -881,10 +881,13 @@ namespace BizHawk.Client.EmuHawk
// autohold/autofire must not be affected by the following inputs
InputManager.ActiveController.Overrides(InputManager.ButtonOverrideAdapter);
// emu.yield()'ing scripts
if (Tools.Has<LuaConsole>())
{
Tools.LuaConsole.ResumeScripts(false);
}
// ext. tools don't yield per se, so just send them a GeneralUpdate
Tools.GeneralUpdateActiveExtTools();
StepRunLoop_Core();
Render();

View File

@ -580,6 +580,14 @@ namespace BizHawk.Client.EmuHawk
}
}
public void GeneralUpdateActiveExtTools()
{
foreach (var tool in _tools.ToArray())
{
if (tool is IExternalToolForm { IsActive: true }) tool.UpdateValues(ToolFormUpdateType.General);
}
}
public void Restart(Config config, IEmulator emulator, IGameInfo game)
{
_config = config;