mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-22 22:13:35 +02:00
Fix crash on haptic feedback on Android
This commit is contained in:
parent
702f57d5cc
commit
48f130cd76
@ -146,7 +146,7 @@ public class NativeMethods
|
||||
public static void hapticFeedback()
|
||||
{
|
||||
final Context ctx = SDL.getContext();
|
||||
if (Build.VERSION.SDK_INT >= 26) {
|
||||
if (Build.VERSION.SDK_INT >= 29) {
|
||||
((Vibrator) ctx.getSystemService(ctx.VIBRATOR_SERVICE)).vibrate(VibrationEffect.createPredefined(VibrationEffect.EFFECT_TICK));
|
||||
} else {
|
||||
((Vibrator) ctx.getSystemService(ctx.VIBRATOR_SERVICE)).vibrate(30);
|
||||
|
Loading…
Reference in New Issue
Block a user