Lua Console - immediate box - in some situations wrap the text in a console.log(), such as if the user simply types a variable name

This commit is contained in:
adelikat 2015-01-27 23:27:44 +00:00
parent 3b13ea4a8f
commit 09072acb3b
1 changed files with 8 additions and 1 deletions

View File

@ -1096,9 +1096,16 @@ namespace BizHawk.Client.EmuHawk
ConsoleLog("Command successfully executed");
}
catch (LuaScriptException ex)
{
try
{
LuaImp.ExecuteString(string.Format("console.log({0})", InputBox.Text));
}
catch
{
ConsoleLog(ex.ToString());
}
}
_consoleCommandHistory.Insert(0, InputBox.Text);
_consoleCommandHistoryIndex = -1;
InputBox.Clear();