mirror of
https://github.com/shadowfacts/jinput-arm64.git
synced 2025-12-06 08:01:59 +01:00
First bodge at pursuading windows to use some of the same button ID's as linux. I dunno which is right, I suspect that both are as there is no standard that both admit to. So for now, lets do that good old nasty hack of string searching.
This commit is contained in:
parent
fb1b49b5a9
commit
c47f72208e
|
|
@ -135,6 +135,21 @@ class DirectInputAxis extends AbstractComponent {
|
|||
offset = 12 + (instance/4);
|
||||
bitshift = (instance%4)*8;
|
||||
bitmask=0xff;
|
||||
|
||||
//Nasty cludge to get some similarities across platforms.
|
||||
if(name.contains("A Button")) {
|
||||
this.id = Component.Identifier.Button.A;
|
||||
} else if(name.contains("B Button")) {
|
||||
this.id = Component.Identifier.Button.B;
|
||||
} else if(name.contains("C Button")) {
|
||||
this.id = Component.Identifier.Button.C;
|
||||
} else if(name.contains("X Button")) {
|
||||
this.id = Component.Identifier.Button.X;
|
||||
} else if(name.contains("Y Button")) {
|
||||
this.id = Component.Identifier.Button.Y;
|
||||
} else if(name.contains("Z Button")) {
|
||||
this.id = Component.Identifier.Button.Z;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue