-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustom.example.lua
More file actions
38 lines (31 loc) · 1.1 KB
/
custom.example.lua
File metadata and controls
38 lines (31 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
custom = {}
local function SetDesktopMouseSensitivity()
print("Setting desktop mouse sensitivity...")
gcb.runDetached("C:\\Users\\thomas\\Desktop\\mon\\mouse.exe", "--dpi 1550 --poll-rate 1000")
end
local function SetIngameMouseSensitivity(pid, name, binary)
local dpi, pollRate
if name == "Cyberpunk 2077" or name == "DOOM The Dark Ages" or binary == "speed2.exe" then
dpi = 1550
pollRate = 4000
else
dpi = 20000
pollRate = 500
end
print("Setting ingame mouse sensitivity...")
gcb.runDetached("C:\\Users\\thomas\\Desktop\\mon\\mouse.exe",
string.format("--dpi %d --poll-rate %d", dpi, pollRate))
end
function custom.gameStart(pid, name, binary)
gcb.sendUdp("192.168.0.1", 8787, "game_start") -- Enables QoS on the router
end
function custom.gameStop(pid, name, binary)
gcb.sendUdp("192.168.0.1", 8787, "game_stop") -- Disables QoS on the router
SetDesktopMouseSensitivity()
end
function custom.gameForeground(pid, name, binary)
SetIngameMouseSensitivity(pid, name, binary)
end
function custom.gameBackground(pid, name, binary)
SetDesktopMouseSensitivity()
end