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;
|
||||
break;
|
||||
default:
|
||||
State = RunState.Disabled;
|
||||
Stop();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1482,14 +1482,19 @@ namespace BizHawk.Client.EmuHawk
|
|||
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
|
||||
EnableLuaFile(file);
|
||||
}
|
||||
else if (!file.Enabled && file.Thread is not null)
|
||||
else if (!file.Enabled)
|
||||
{
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue