mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-03-30 18:14:55 +02:00
support for n buttons
This commit is contained in:
parent
fc7c0fa846
commit
54e06e4026
|
|
@ -152,13 +152,6 @@ public class Controller {
|
|||
Sys.initialize();
|
||||
initIDs();
|
||||
|
||||
// Assign names to all the buttons
|
||||
buttonName = new String[8];
|
||||
for (int i = 0; i < 8; i ++) {
|
||||
buttonName[i] = "BUTTON" + i;
|
||||
buttonMap.put(buttonName[i], new Integer(i));
|
||||
}
|
||||
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
|
|
@ -176,6 +169,13 @@ public class Controller {
|
|||
}
|
||||
|
||||
nCreate();
|
||||
|
||||
// Assign names to all the buttons
|
||||
buttonName = new String[buttons.length];
|
||||
for (int i = 0; i < buttons.length; i ++) {
|
||||
buttonName[i] = "BUTTON" + i;
|
||||
buttonMap.put(buttonName[i], new Integer(i));
|
||||
}
|
||||
|
||||
created = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue