tastudio: clean up garbage lua text and drawings.

- text was written twice if we update tools and PauseOnFrame (seek) within one frame.
- drawings didn't update during turbo even when RunScriptsDuringTurbo was on, but a whole bunch of accumulated drawings was appearing at once, when you do a normal advance after turbo mode.
This commit is contained in:
feos 2015-10-22 19:33:04 +03:00
parent baaa1c3ec2
commit 4e7d03d9a3
2 changed files with 8 additions and 2 deletions

View File

@ -612,8 +612,9 @@ namespace BizHawk.Client.EmuHawk
if (value == null) // TODO: make an Event handler instead, but the logic here is that after turbo seeking, tools will want to do a real update when the emulator finally pauses
{
GlobalWin.Tools.UpdateToolsBefore();
GlobalWin.Tools.UpdateToolsAfter();
bool skipScripts = !(Global.Config.TurboSeek && !Global.Config.RunLuaDuringTurbo);
GlobalWin.Tools.UpdateToolsBefore(skipScripts);
GlobalWin.Tools.UpdateToolsAfter(skipScripts);
}
}
}

View File

@ -566,6 +566,11 @@ namespace BizHawk.Client.EmuHawk
tool.FastUpdate();
}
}
if (Global.Config.RunLuaDuringTurbo && Has<LuaConsole>())
{
LuaConsole.EndLuaDrawing();
}
}
public bool IsAvailable<T>()