mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-04-23 00:26:42 +00:00
Use correct ranges for d-pad
This commit is contained in:
@@ -170,7 +170,7 @@ public class EvdevHandler implements Runnable {
|
|||||||
else if (code==mapping.abs_rz)
|
else if (code==mapping.abs_rz)
|
||||||
rightTrigger = absRT.getByte(value);
|
rightTrigger = absRT.getByte(value);
|
||||||
else if (code==mapping.abs_dpad_x) {
|
else if (code==mapping.abs_dpad_x) {
|
||||||
int dir = absRT.getDirection(value);
|
int dir = absDX.getDirection(value);
|
||||||
if (dir==EvdevAbsolute.UP) {
|
if (dir==EvdevAbsolute.UP) {
|
||||||
buttonFlags |= ControllerPacket.RIGHT_FLAG;
|
buttonFlags |= ControllerPacket.RIGHT_FLAG;
|
||||||
buttonFlags &= ~ControllerPacket.LEFT_FLAG;
|
buttonFlags &= ~ControllerPacket.LEFT_FLAG;
|
||||||
@@ -182,7 +182,7 @@ public class EvdevHandler implements Runnable {
|
|||||||
buttonFlags &= ~ControllerPacket.RIGHT_FLAG;
|
buttonFlags &= ~ControllerPacket.RIGHT_FLAG;
|
||||||
}
|
}
|
||||||
} else if (code==mapping.abs_dpad_y) {
|
} else if (code==mapping.abs_dpad_y) {
|
||||||
int dir = absRT.getDirection(value);
|
int dir = absDY.getDirection(value);
|
||||||
if (dir==EvdevAbsolute.DOWN) {
|
if (dir==EvdevAbsolute.DOWN) {
|
||||||
buttonFlags |= ControllerPacket.UP_FLAG;
|
buttonFlags |= ControllerPacket.UP_FLAG;
|
||||||
buttonFlags &= ~ControllerPacket.DOWN_FLAG;
|
buttonFlags &= ~ControllerPacket.DOWN_FLAG;
|
||||||
|
|||||||
Reference in New Issue
Block a user