mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
parent
99dcb14582
commit
404a662383
@ -509,6 +509,10 @@ public class EbitenView extends ViewGroup implements InputManager.InputDeviceLis
|
||||
@Override
|
||||
public void onInputDeviceAdded(int deviceId) {
|
||||
InputDevice inputDevice = this.inputManager.getInputDevice(deviceId);
|
||||
// The InputDevice can be null on some deivces (#1342).
|
||||
if (inputDevice == null) {
|
||||
return;
|
||||
}
|
||||
int sources = inputDevice.getSources();
|
||||
if ((sources & InputDevice.SOURCE_GAMEPAD) != InputDevice.SOURCE_GAMEPAD &&
|
||||
(sources & InputDevice.SOURCE_JOYSTICK) != InputDevice.SOURCE_JOYSTICK) {
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user