mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-06 13:18:27 +02:00
Move some patch code to external files
This commit is contained in:
11
src/modules/patches/vibration-adjust.js
Normal file
11
src/modules/patches/vibration-adjust.js
Normal file
@@ -0,0 +1,11 @@
|
||||
if (!window.BX_ENABLE_CONTROLLER_VIBRATION) {
|
||||
return void(0);
|
||||
}
|
||||
|
||||
const intensity = window.BX_VIBRATION_INTENSITY;
|
||||
if (intensity && intensity < 1) {
|
||||
e.leftMotorPercent *= intensity;
|
||||
e.rightMotorPercent *= intensity;
|
||||
e.leftTriggerMotorPercent *= intensity;
|
||||
e.rightTriggerMotorPercent *= intensity;
|
||||
}
|
Reference in New Issue
Block a user