Fix regression from commit 8c7b0b5e
. file.Thread not being null no longer means the file hadn't stopped.
This commit is contained in:
parent
4fa5203165
commit
39d37a389f
|
@ -72,7 +72,7 @@ namespace BizHawk.Client.Common
|
||||||
FrameWaiting = false;
|
FrameWaiting = false;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
State = RunState.Disabled;
|
Stop();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1482,14 +1482,19 @@ namespace BizHawk.Client.EmuHawk
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
file.Toggle();
|
if (file.Paused)
|
||||||
|
{
|
||||||
|
file.State = LuaFile.RunState.Running;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (file.Enabled && file.Thread is null)
|
file.Toggle();
|
||||||
|
if (file.Enabled)
|
||||||
{
|
{
|
||||||
LuaImp.RegisteredFunctions.RemoveForFile(file, Emulator); // First remove any existing registered functions for this file
|
LuaImp.RegisteredFunctions.RemoveForFile(file, Emulator); // First remove any existing registered functions for this file
|
||||||
EnableLuaFile(file);
|
EnableLuaFile(file);
|
||||||
}
|
}
|
||||||
else if (!file.Enabled && file.Thread is not null)
|
else if (!file.Enabled)
|
||||||
{
|
{
|
||||||
LuaImp.DisableLuaScript(file);
|
LuaImp.DisableLuaScript(file);
|
||||||
// there used to be a call here which did a redraw of the Gui/OSD, which included a call to `Tools.UpdateToolsAfter` --yoshi
|
// there used to be a call here which did a redraw of the Gui/OSD, which included a call to `Tools.UpdateToolsAfter` --yoshi
|
||||||
|
|
Loading…
Reference in New Issue