mirror of
https://github.com/shadowfacts/jinput-arm64.git
synced 2026-04-04 22:18:00 +00:00
Update to allow hat switches to be in 4 more positions.
This commit is contained in:
parent
7c2ae4030d
commit
c931dd231c
3 changed files with 36 additions and 0 deletions
|
|
@ -155,12 +155,20 @@ class DirectInputAxis extends AbstractAxis {
|
|||
return Axis.POV.OFF;
|
||||
} else if (data == 0.0) {
|
||||
return Axis.POV.UP;
|
||||
} else if (data == 4500) {
|
||||
return Axis.POV.UP_RIGHT;
|
||||
} else if (data == 9000) {
|
||||
return Axis.POV.RIGHT;
|
||||
} else if (data == 13500) {
|
||||
return Axis.POV.DOWN_RIGHT;
|
||||
} else if (data == 18000) {
|
||||
return Axis.POV.DOWN;
|
||||
} else if (data == 22500) {
|
||||
return Axis.POV.DOWN_LEFT;
|
||||
} else if (data == 27000) {
|
||||
return Axis.POV.LEFT;
|
||||
} else if (data == 31500) {
|
||||
return Axis.POV.UP_LEFT;
|
||||
} else {
|
||||
System.err.print("Unexpected value for DX8 HAT: "+data);
|
||||
return Axis.POV.OFF;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue