From fe07119585fd4bf378f8f0b551cc3ad7f1ce9c5f Mon Sep 17 00:00:00 2001 From: CrIcKeT Date: Sun, 28 Nov 2021 14:58:57 +0300 Subject: [PATCH] Added Win64 & Linux, Linux64 --- lua/metrostroi/sv_turbostroi_v2.lua | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/lua/metrostroi/sv_turbostroi_v2.lua b/lua/metrostroi/sv_turbostroi_v2.lua index 1edc9ec..b23398c 100644 --- a/lua/metrostroi/sv_turbostroi_v2.lua +++ b/lua/metrostroi/sv_turbostroi_v2.lua @@ -214,7 +214,26 @@ typedef struct { } thread_msg; thread_msg ThreadRecvMessage(void* p); ]] -local TS = ffi.load("gmsv_turbostroi_win32") + +local OSName = "gmsv_turbostroi_" + +if jis.os == "Windows" then + OSName = OSName.."win" + if jit.arch == "x86" + OSName = OSName.."86" + else + OSName = OSName.."64" + end +elseif jit.os == "Linux" then + OSName = OSName.."linux" + if jit.arch == "x86" + OSName = OSName.."86" + else + OSName = OSName.."64" + end +end + +local TS = ffi.load(OSName) Metrostroi = {} local dataCache = {wires = {},wiresW = {},wiresL = {}}