mirror of
https://github.com/shadowfacts/jinput-arm64.git
synced 2026-04-04 14:07:53 +00:00
Linux: Fix an IndexOutOfBoundsException for unknown controller types
This commit is contained in:
parent
43b4dab801
commit
9d211951c1
1 changed files with 3 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue