From c0a08b4147931634ec94326e2ac549cdfa9e3f4c Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Thu, 21 Nov 2013 08:29:55 +0100 Subject: [gugus] controls --- scripts/gugus/controls.lua | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/scripts/gugus/controls.lua b/scripts/gugus/controls.lua index 2651f17..200598e 100644 --- a/scripts/gugus/controls.lua +++ b/scripts/gugus/controls.lua @@ -1,7 +1,7 @@ --- -mLCDdown = 9 -mLCDup = 10 +mLCDdown = 1 +mLCDup = 2 mKeyDelay = 100 -- @@ -11,9 +11,9 @@ mRFactorLCD_keys = { 0x37, -- standings 0x38, -- pit 0x39, -- vehicle - 0x30, -- aids - "-", -- extra - "=" -- race + 0x30, -- driving aids. FUCK driving aids. + 0xBD, -- extra ( VK_OEM_MINUS 0xBD ) + '=' -- race } mRFactorLCD_states = table.getn(mRFactorLCD_keys) mRFactorLCD_state = 0 @@ -23,22 +23,24 @@ mRFactorLCD_state = 0 mRFactor2LCD_keys = { 0x36, -- std 0x37, -- standings - 0xA3, -- pit (Right CTRL) - 0x38, -- vehicle - 0x39, -- aids + VK_RCONTROL, -- pit (Right CTRL - VK_RCONTROL - 0xA3) + 0x38, -- vehicle. Bitch, i’m using TrackMap + 0x39, -- driving aids. FUCK driving aids. 0x30, -- extra - "-", -- race - "=" -- penalities + 0xBD, -- race ( VK_OEM_MINUS 0xBD ) + '=' -- penalities } mRFactor2LCD_states = table.getn(mRFactor2LCD_keys) mRFactor2LCD_state = 0 function custom_controlsEvent(deviceType, ctrlType, ctrlPos, value, funcIndex, targetDevice) - --print ( string.format("[%s] %s:%s = %s => %s (%s)", deviceType, ctrlType, ctrlPos, value, funcIndex, targetDevice) ) + dev = GetDeviceType(deviceType) + if dev == nil then dev = "none" end + --print ( string.format("%s [%s] %s:%s = %s => %s (%s)", deviceType, dev, ctrlType, ctrlPos, value, funcIndex, targetDevice) ) if funcIndex == -1 then - if ctrlType == 1 and ( ctrlPos == mLCDup or ctrlPos == mLCDdown ) and value == 0 then + if dev == "SLI-PRO" and ctrlType == 1 and ( ctrlPos == mLCDup or ctrlPos == mLCDdown ) and value == 0 then local Key = nil --if ctrlPos == mLCDup then -- print ( " + LCD up") -- cgit v1.2.3