* Throw proper exception in TestJoystick if none found
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7440 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
e6d859143f
commit
7d91174b5b
@ -21,6 +21,9 @@ public class TestJoystick extends SimpleApplication implements AnalogListener {
|
||||
@Override
|
||||
public void simpleInitApp() {
|
||||
Joystick[] joysticks = inputManager.getJoysticks();
|
||||
if (joysticks == null)
|
||||
throw new IllegalStateException("Cannot find any joysticks!");
|
||||
|
||||
for (Joystick joy : joysticks){
|
||||
System.out.println(joy.toString());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user