From 29037f8e3d179c262b9abca67c67bfd021d3a622 Mon Sep 17 00:00:00 2001 From: mcmicha Date: Sat, 15 Apr 2017 16:29:32 +0200 Subject: [PATCH] Change the function call ExportScript.Tools.ProcessInput() to coroutine call, to increase speed. --- Scripts/DCS-ExportScript/ExportScript.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Scripts/DCS-ExportScript/ExportScript.lua b/Scripts/DCS-ExportScript/ExportScript.lua index 436c36b..4e8796e 100644 --- a/Scripts/DCS-ExportScript/ExportScript.lua +++ b/Scripts/DCS-ExportScript/ExportScript.lua @@ -78,7 +78,12 @@ function LuaExportStart() end function LuaExportBeforeNextFrame() - ExportScript.Tools.ProcessInput() + if ExportScript.Config.Debug then + ExportScript.Tools.ProcessInput() + else + ExportScript.coProcessArguments_BeforeNextFrame = coroutine.create(ExportScript.Tools.ProcessInput) + coStatus = coroutine.resume(ExportScript.coProcessArguments_BeforeNextFrame) + end end function LuaExportAfterNextFrame()