mirror of
https://github.com/shadowfacts/jinput-arm64.git
synced 2026-02-05 15:24:14 +01:00
Linux: Fix an IndexOutOfBoundsException for unknown controller types
This commit is contained in:
parent
43b4dab801
commit
9d211951c1
|
|
@ -783,7 +783,9 @@ class LinuxNativeTypesMap {
|
|||
* @return The jinput id
|
||||
*/
|
||||
public static Component.Identifier getButtonID(int nativeID) {
|
||||
Component.Identifier retval = INSTANCE.buttonIDs[nativeID];
|
||||
Component.Identifier retval = null;
|
||||
if (nativeID >= 0 && nativeID < INSTANCE.buttonIDs.length)
|
||||
retval = INSTANCE.buttonIDs[nativeID];
|
||||
if(retval == null) {
|
||||
retval = Component.Identifier.Key.UNKNOWN;
|
||||
INSTANCE.buttonIDs[nativeID] = retval;
|
||||
|
|
|
|||
Loading…
Reference in a new issue