Lua Console - Move StartLuaDrawing() and EndLuaDrawing() to LuaImp since they exclusively LuaImp logic
This commit is contained in:
parent
6196d81b5d
commit
facd845453
|
@ -102,6 +102,22 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
public void StartLuaDrawing()
|
||||
{
|
||||
if (ScriptList.Any() && GuiLibrary.SurfaceIsNull)
|
||||
{
|
||||
GuiLibrary.DrawNew("emu");
|
||||
}
|
||||
}
|
||||
|
||||
public void EndLuaDrawing()
|
||||
{
|
||||
if (ScriptList.Any())
|
||||
{
|
||||
GuiLibrary.DrawFinish();
|
||||
}
|
||||
}
|
||||
|
||||
public LuaDocumentation Docs { get; }
|
||||
public bool IsRunning { get; set; }
|
||||
public EventWaitHandle LuaWait { get; private set; }
|
||||
|
|
|
@ -549,22 +549,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
public void StartLuaDrawing()
|
||||
{
|
||||
if (LuaImp.ScriptList.Any() && LuaImp.GuiLibrary.SurfaceIsNull)
|
||||
{
|
||||
LuaImp.GuiLibrary.DrawNew("emu");
|
||||
}
|
||||
}
|
||||
|
||||
public void EndLuaDrawing()
|
||||
{
|
||||
if (LuaImp.ScriptList.Any())
|
||||
{
|
||||
LuaImp.GuiLibrary.DrawFinish();
|
||||
}
|
||||
}
|
||||
|
||||
public bool WaitOne(int timeout)
|
||||
{
|
||||
if (!IsHandleCreated || IsDisposed)
|
||||
|
@ -845,8 +829,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
// We want any gui.text messages from a script to immediately update even when paused
|
||||
GlobalWin.OSD.ClearGUIText();
|
||||
GlobalWin.Tools.UpdateToolsAfter();
|
||||
EndLuaDrawing();
|
||||
StartLuaDrawing();
|
||||
LuaImp.EndLuaDrawing();
|
||||
LuaImp.StartLuaDrawing();
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
|
|
|
@ -650,7 +650,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
if (!fromLua)
|
||||
{
|
||||
LuaConsole.StartLuaDrawing();
|
||||
LuaConsole.LuaImp.StartLuaDrawing();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -670,7 +670,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
if (!fromLua)
|
||||
{
|
||||
LuaConsole.EndLuaDrawing();
|
||||
LuaConsole.LuaImp.EndLuaDrawing();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -707,7 +707,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
if (Global.Config.RunLuaDuringTurbo && Has<LuaConsole>())
|
||||
{
|
||||
LuaConsole.EndLuaDrawing();
|
||||
LuaConsole.LuaImp.EndLuaDrawing();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue