summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2013-11-21 08:29:55 +0100
committerHugues Hiegel <hugues@hiegel.fr>2013-11-21 08:29:55 +0100
commitc0a08b4147931634ec94326e2ac549cdfa9e3f4c (patch)
tree5b89aaafe9ec4e8e8d13351709e076e3712c4230
parentc6e7d13f54387b00e7757f9e38364a3bcaf80407 (diff)
[gugus] controls
-rw-r--r--scripts/gugus/controls.lua26
1 files 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")