mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-04-19 23:00:27 +00:00
reimplemented the trigger checkbox
This commit is contained in:
@@ -85,11 +85,14 @@ public class Gamepad implements DeviceListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private float sanitizeValue(Mapping mapped, float value) {
|
private float sanitizeValue(Mapping mapped, float value) {
|
||||||
|
float retVal = value;
|
||||||
if (mapped.invert) {
|
if (mapped.invert) {
|
||||||
return -value;
|
retVal = -retVal;
|
||||||
} else {
|
|
||||||
return value;
|
|
||||||
}
|
}
|
||||||
|
if (mapped.trigger) {
|
||||||
|
retVal = (retVal + 1) / 2;
|
||||||
|
}
|
||||||
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleAnalogComponent(GamepadComponent padComp, float value) {
|
private void handleAnalogComponent(GamepadComponent padComp, float value) {
|
||||||
|
|||||||
Reference in New Issue
Block a user