Lua - clear out lua drawing surface on restart
This commit is contained in:
parent
307845b3b5
commit
6f2488aa57
|
@ -70,6 +70,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
_luaSurface = null;
|
||||
}
|
||||
|
||||
public bool HasLuaSurface
|
||||
{
|
||||
get { return _luaSurface != null; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Helpers
|
||||
|
|
|
@ -103,6 +103,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public void Restart()
|
||||
{
|
||||
if (LuaImp != null && LuaImp.GuiLibrary != null && LuaImp.GuiLibrary.HasLuaSurface)
|
||||
{
|
||||
LuaImp.GuiLibrary.DrawFinish();
|
||||
}
|
||||
|
||||
LuaImp = new EmuLuaLibrary(this);
|
||||
InputBox.AutoCompleteCustomSource.AddRange(LuaImp.Docs.Select(a => a.Library + "." + a.Name).ToArray());
|
||||
UpdateDialog();
|
||||
|
@ -340,7 +345,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public bool LoadLuaSession(string path)
|
||||
{
|
||||
return _luaList.LoadLuaSession(path);
|
||||
var result = _luaList.LoadLuaSession(path);
|
||||
|
||||
RunLuaScripts();
|
||||
UpdateDialog();
|
||||
_luaList.Changes = false;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue