mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-04-03 06:26:04 +00:00
reimplemented the trigger checkbox
This commit is contained in:
@@ -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