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()
|
public void Close()
|
||||||
{
|
{
|
||||||
|
LuaKillThread();
|
||||||
lua.Close();
|
lua.Close();
|
||||||
LuaWait.Dispose();
|
LuaWait.Dispose();
|
||||||
}
|
}
|
||||||
|
@ -118,6 +119,11 @@ namespace BizHawk.MultiClient
|
||||||
isRunning = false;
|
isRunning = false;
|
||||||
LuaWait.Set();
|
LuaWait.Set();
|
||||||
}
|
}
|
||||||
|
public void LuaKillThread()
|
||||||
|
{
|
||||||
|
if (LuaThread != null)
|
||||||
|
LuaThread.Abort();
|
||||||
|
}
|
||||||
|
|
||||||
public void DoLuaFile(string File)
|
public void DoLuaFile(string File)
|
||||||
{
|
{
|
||||||
|
|
|
@ -119,6 +119,7 @@ namespace BizHawk.MultiClient
|
||||||
CloseGame();
|
CloseGame();
|
||||||
Global.MovieSession.Movie.StopMovie();
|
Global.MovieSession.Movie.StopMovie();
|
||||||
SaveConfig();
|
SaveConfig();
|
||||||
|
LuaConsole1.LuaImp.StopScripts();
|
||||||
};
|
};
|
||||||
|
|
||||||
ResizeBegin += (o, e) =>
|
ResizeBegin += (o, e) =>
|
||||||
|
@ -364,7 +365,7 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
CurrAviWriter.CloseFile();
|
CurrAviWriter.CloseFile();
|
||||||
CurrAviWriter = null;
|
CurrAviWriter = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CheckMessages()
|
void CheckMessages()
|
||||||
|
|
|
@ -93,7 +93,7 @@ namespace BizHawk.MultiClient
|
||||||
private void StopAllScripts()
|
private void StopAllScripts()
|
||||||
{
|
{
|
||||||
for (int x = 0; x < luaList.Count; x++)
|
for (int x = 0; x < luaList.Count; x++)
|
||||||
luaList[x].Enabled = false;
|
luaList[x].Enabled = false;
|
||||||
LuaImp.Close();
|
LuaImp.Close();
|
||||||
LuaImp = new LuaImplementation(this);
|
LuaImp = new LuaImplementation(this);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue