From ee263fbfbf7e2d40c5d754cafa53b25df9859c5d Mon Sep 17 00:00:00 2001 From: adelikat Date: Thu, 2 Jul 2020 12:10:15 -0500 Subject: [PATCH] LuaConsole - simplify WriteToOutputWindow some --- src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs index deb23c66d4..292ff02ab5 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs @@ -521,17 +521,18 @@ namespace BizHawk.Client.EmuHawk return; } - OutputBox.Invoke(() => - { - _messageCount++; + _messageCount++; - if (_messageCount <= MaxCount) + if (_messageCount <= MaxCount) + { + OutputBox.Invoke(() => { OutputBox.Text += message; OutputBox.SelectionStart = OutputBox.Text.Length; OutputBox.ScrollToCaret(); - } - }); + }); + } + } public void ClearOutputWindow()