Lua Drawing - fix so that multiple scripts can draw at once

This commit is contained in:
adelikat 2012-10-06 14:36:02 +00:00
parent 644ed40f59
commit 1c17f8dbed
2 changed files with 5 additions and 3 deletions

View File

@ -2317,6 +2317,7 @@ namespace BizHawk.MultiClient
/// </summary>
public void UpdateToolsBefore()
{
LuaConsole1.LuaImp.FrameRegisterBefore();
NESNameTableViewer1.UpdateValues();
NESPPU1.UpdateValues();

View File

@ -840,18 +840,19 @@ namespace BizHawk.MultiClient
/// <param name="includeFrameWaiters">should frame waiters be waken up? only use this immediately before a frame of emulation</param>
public void ResumeScripts(bool includeFrameWaiters)
{
LuaImp.gui_drawNewEmu();
for (int i = 0; i < luaList.Count; i++)
{
try
{
LuaImp.gui_drawNewEmu();
//LuaImp.gui_clearGraphics();
if (luaList[i].Enabled && luaList[i].Thread != null && !(luaList[i].Paused))
{
bool prohibit = false;
if (luaList[i].FrameWaiting && !includeFrameWaiters)
{
prohibit = true;
}
if (!prohibit)
{
var result = LuaImp.ResumeScript(luaList[i].Thread);
@ -859,7 +860,6 @@ namespace BizHawk.MultiClient
luaList[i].FrameWaiting = result.WaitForFrame;
}
}
LuaImp.gui_drawFinishEmu();
}
catch (Exception ex)
{
@ -872,6 +872,7 @@ namespace BizHawk.MultiClient
else MessageBox.Show(ex.ToString());
}
}
LuaImp.gui_drawFinishEmu();
}
public bool IsRunning()