Vibrate on OSC roll-over button presses too

This commit is contained in:
lynxnb 2023-04-05 01:40:06 +02:00 committed by Billy Laws
parent 655ca8f89b
commit 7cf45b11b0

View File

@ -139,7 +139,8 @@ class OnScreenControllerView @JvmOverloads constructor(context : Context, attrs
button.touchPointerId = pointerId
if (button.onFingerDown(x, y))
onButtonStateChangedListener?.invoke(button.buttonId, ButtonState.Pressed)
if (hapticFeedback) vibrator.vibrate(effectClick)
if (hapticFeedback)
vibrator.vibrate(effectClick)
performClick()
handled = true
}
@ -159,6 +160,8 @@ class OnScreenControllerView @JvmOverloads constructor(context : Context, attrs
otherButton.partnerPointerId = fingerId
if (otherButton.onFingerDown(x, y))
onButtonStateChangedListener?.invoke(otherButton.buttonId, ButtonState.Pressed)
if (hapticFeedback)
vibrator.vibrate(effectClick)
performClick()
handled = true
}