File tree Expand file tree Collapse file tree
project/android/app/src/main/java/org/libsdl/app Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
6161 private static final String TAG = "SDL" ;
6262 private static final int SDL_MAJOR_VERSION = 2 ;
6363 private static final int SDL_MINOR_VERSION = 30 ;
64- private static final int SDL_MICRO_VERSION = 0 ;
64+ private static final int SDL_MICRO_VERSION = 2 ;
6565/*
6666 // Display InputType.SOURCE/CLASS of events and devices
6767 //
Original file line number Diff line number Diff line change @@ -546,13 +546,15 @@ public void pollHapticDevices() {
546546 if (haptic == null ) {
547547 InputDevice device = InputDevice .getDevice (deviceIds [i ]);
548548 Vibrator vib = device .getVibrator ();
549- if (vib .hasVibrator ()) {
550- haptic = new SDLHaptic ();
551- haptic .device_id = deviceIds [i ];
552- haptic .name = device .getName ();
553- haptic .vib = vib ;
554- mHaptics .add (haptic );
555- SDLControllerManager .nativeAddHaptic (haptic .device_id , haptic .name );
549+ if (vib != null ) {
550+ if (vib .hasVibrator ()) {
551+ haptic = new SDLHaptic ();
552+ haptic .device_id = deviceIds [i ];
553+ haptic .name = device .getName ();
554+ haptic .vib = vib ;
555+ mHaptics .add (haptic );
556+ SDLControllerManager .nativeAddHaptic (haptic .device_id , haptic .name );
557+ }
556558 }
557559 }
558560 }
You can’t perform that action at this time.
0 commit comments