Android: Fix overlay d-pad not working until finger moves

A switch case fallthrough was overlooked when translating from Java to
Kotlin.
This commit is contained in:
JosJuice 2023-06-11 10:59:47 +02:00
parent c961c6c35a
commit ae4d52c838
1 changed files with 4 additions and 1 deletions

View File

@ -206,7 +206,10 @@ class InputOverlay(context: Context?, attrs: AttributeSet?) : SurfaceView(contex
pressed = true
}
}
}
when (event.action and MotionEvent.ACTION_MASK) {
MotionEvent.ACTION_DOWN,
MotionEvent.ACTION_POINTER_DOWN,
MotionEvent.ACTION_MOVE -> {
if (dpad.trackId == event.getPointerId(pointerIndex)) {
val dpadPressed = booleanArrayOf(false, false, false, false)