mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-10-20 15:27:18 +00:00
reimplemented the trigger checkbox
This commit is contained in:
1 parent
72b8da34af
commit
633debeddd
1 file changed
+7
-4
@@ -85,13 +85,16 @@ public class Gamepad implements DeviceListener {
|
||||
}
|
||||
|
||||
private float sanitizeValue(Mapping mapped, float value) {
|
||||
float retVal = value;
|
||||
if (mapped.invert) {
|
||||
return -value;
|
||||
} else {
|
||||
return value;
|
||||
retVal = -retVal;
|
||||
}
|
||||
if (mapped.trigger) {
|
||||
retVal = (retVal + 1) / 2;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
private void handleAnalogComponent(GamepadComponent padComp, float value) {
|
||||
switch (padComp) {
|
||||
case LS_X:
|
||||
|
||||
Reference in new issue
Block a user