Properly start scripts after loading Lua session
Previously, scripts would display as enabled but not actually run until toggled off and on.
This commit is contained in:
parent
0effd435f6
commit
5d143ca879
|
@ -501,16 +501,24 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
var result = LuaImp.ScriptList.Load(path, Settings.DisableLuaScriptsOnLoad);
|
||||
|
||||
RunLuaScripts();
|
||||
UpdateDialog();
|
||||
LuaImp.ScriptList.Changes = false;
|
||||
|
||||
Config.RecentLuaSession.Add(path);
|
||||
foreach (var script in LuaImp.ScriptList)
|
||||
{
|
||||
Config.RecentLua.Add(script.Path);
|
||||
if (!script.IsSeparator)
|
||||
{
|
||||
if (script.Enabled)
|
||||
{
|
||||
EnableLuaFile(script);
|
||||
}
|
||||
|
||||
Config.RecentLua.Add(script.Path);
|
||||
}
|
||||
}
|
||||
|
||||
LuaImp.ScriptList.Changes = false;
|
||||
Config.RecentLuaSession.Add(path);
|
||||
UpdateDialog();
|
||||
AddFileWatches();
|
||||
|
||||
ClearOutputWindow();
|
||||
return result;
|
||||
}
|
||||
|
@ -678,8 +686,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
Config.RecentLuaSession.HandleLoadError(MainForm, path);
|
||||
}
|
||||
}
|
||||
|
||||
AddFileWatches();
|
||||
}
|
||||
|
||||
public override bool AskSaveChanges()
|
||||
|
|
Loading…
Reference in New Issue