Android: Add static property to disable sensors but still have joysticks.
May move this to AppSettings later, but not sure yet.
This commit is contained in:
parent
6c24390663
commit
d80de0cc5b
@ -79,6 +79,7 @@ import java.util.logging.Logger;
|
||||
*/
|
||||
public class AndroidJoyInput implements JoyInput {
|
||||
private static final Logger logger = Logger.getLogger(AndroidJoyInput.class.getName());
|
||||
public static boolean disableSensors = false;
|
||||
|
||||
protected AndroidInputHandler inputHandler;
|
||||
protected List<Joystick> joystickList = new ArrayList<Joystick>();
|
||||
@ -208,7 +209,9 @@ public class AndroidJoyInput implements JoyInput {
|
||||
@Override
|
||||
public Joystick[] loadJoysticks(InputManager inputManager) {
|
||||
logger.log(Level.INFO, "loading joysticks for {0}", this.getClass().getName());
|
||||
joystickList.add(sensorJoyInput.loadJoystick(joystickList.size(), inputManager));
|
||||
if (!disableSensors) {
|
||||
joystickList.add(sensorJoyInput.loadJoystick(joystickList.size(), inputManager));
|
||||
}
|
||||
return joystickList.toArray( new Joystick[joystickList.size()] );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user