Disable Lua script loading on Unix (resolves #1735)
This commit is contained in:
parent
a7ffdd948e
commit
6e809adc66
|
@ -81,7 +81,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
OpenLuaConsole();
|
||||
if (GlobalWin.Tools.Has<LuaConsole>())
|
||||
{
|
||||
GlobalWin.Tools.LuaConsole.LoadLuaFile(filename);
|
||||
if (OSTailoredCode.IsUnixHost) Console.WriteLine($"The Lua environment can currently only be created on Windows, {filename} will not be loaded.");
|
||||
else GlobalWin.Tools.LuaConsole.LoadLuaFile(filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -383,7 +383,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
//load Lua Script if requested in the command line arguments
|
||||
if (_argParser.luaScript != null)
|
||||
{
|
||||
GlobalWin.Tools.LuaConsole.LoadLuaFile(_argParser.luaScript);
|
||||
if (OSTailoredCode.IsUnixHost) Console.WriteLine($"The Lua environment can currently only be created on Windows, {_argParser.luaScript} will not be loaded.");
|
||||
else GlobalWin.Tools.LuaConsole.LoadLuaFile(_argParser.luaScript);
|
||||
}
|
||||
|
||||
GlobalWin.Tools.AutoLoad();
|
||||
|
|
|
@ -148,6 +148,18 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
if (OSTailoredCode.IsUnixHost)
|
||||
{
|
||||
OpenSessionMenuItem.Enabled = false;
|
||||
RecentSessionsSubMenu.Enabled = false;
|
||||
RecentScriptsSubMenu.Enabled = false;
|
||||
NewScriptMenuItem.Enabled = false;
|
||||
OpenScriptMenuItem.Enabled = false;
|
||||
NewScriptToolbarItem.Enabled = false;
|
||||
OpenScriptToolbarItem.Enabled = false;
|
||||
ConsoleLog("The Lua environment can currently only be created on Windows. You may not load scripts.");
|
||||
}
|
||||
|
||||
LuaListView.AllColumns.Clear();
|
||||
SetColumns();
|
||||
}
|
||||
|
@ -1249,6 +1261,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void LuaConsole_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
if (OSTailoredCode.IsUnixHost)
|
||||
{
|
||||
Console.WriteLine("The Lua environment can currently only be created on Windows, no scripts will be loaded.");
|
||||
return;
|
||||
}
|
||||
var filePaths = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue