Kill the lua thread as part of closing.
This commit is contained in:
parent
5492a9fd19
commit
ca1114311c
|
@ -31,6 +31,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public void Close()
|
||||
{
|
||||
LuaKillThread();
|
||||
lua.Close();
|
||||
LuaWait.Dispose();
|
||||
}
|
||||
|
@ -118,6 +119,11 @@ namespace BizHawk.MultiClient
|
|||
isRunning = false;
|
||||
LuaWait.Set();
|
||||
}
|
||||
public void LuaKillThread()
|
||||
{
|
||||
if (LuaThread != null)
|
||||
LuaThread.Abort();
|
||||
}
|
||||
|
||||
public void DoLuaFile(string File)
|
||||
{
|
||||
|
|
|
@ -119,6 +119,7 @@ namespace BizHawk.MultiClient
|
|||
CloseGame();
|
||||
Global.MovieSession.Movie.StopMovie();
|
||||
SaveConfig();
|
||||
LuaConsole1.LuaImp.StopScripts();
|
||||
};
|
||||
|
||||
ResizeBegin += (o, e) =>
|
||||
|
@ -364,7 +365,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
CurrAviWriter.CloseFile();
|
||||
CurrAviWriter = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CheckMessages()
|
||||
|
|
|
@ -93,7 +93,7 @@ namespace BizHawk.MultiClient
|
|||
private void StopAllScripts()
|
||||
{
|
||||
for (int x = 0; x < luaList.Count; x++)
|
||||
luaList[x].Enabled = false;
|
||||
luaList[x].Enabled = false;
|
||||
LuaImp.Close();
|
||||
LuaImp = new LuaImplementation(this);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue