A better fix for something I broke

This commit is contained in:
adelikat 2014-01-21 16:31:12 +00:00
parent 9df0821fcd
commit 8ab655d963
2 changed files with 10 additions and 9 deletions

View File

@ -21,6 +21,15 @@ namespace BizHawk.Client.EmuHawk
Docs = new LuaDocumentation(); Docs = new LuaDocumentation();
} }
public EmuLuaLibrary(LuaConsole passed)
:this()
{
LuaWait = new AutoResetEvent(false);
Docs.Clear();
_caller = passed.Get();
LuaRegister(_lua);
}
public LuaDocumentation Docs { get; private set; } public LuaDocumentation Docs { get; private set; }
public bool IsRunning { get; set; } public bool IsRunning { get; set; }
public EventWaitHandle LuaWait { get; private set; } public EventWaitHandle LuaWait { get; private set; }
@ -61,14 +70,6 @@ namespace BizHawk.Client.EmuHawk
_eventLibrary.CallFrameAfterEvent(); _eventLibrary.CallFrameAfterEvent();
} }
public EmuLuaLibrary(LuaConsole passed)
{
LuaWait = new AutoResetEvent(false);
Docs.Clear();
_caller = passed.Get();
LuaRegister(_lua);
}
public void Close() public void Close()
{ {
_lua = new Lua(); _lua = new Lua();

View File

@ -48,7 +48,7 @@ namespace BizHawk.Client.EmuHawk
}; };
InitializeComponent(); InitializeComponent();
LuaImp = new EmuLuaLibrary(); LuaImp = new EmuLuaLibrary(this);
Closing += (o, e) => Closing += (o, e) =>
{ {
if (AskSave()) if (AskSave())