mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Fix crash on haptic feedback on Android
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user