cleanup motionevent

This commit is contained in:
qimiko committed 2024-02-11 00:55:33 -07:00
1 parent c6155443a2
commit 642fdc36ee
1 file changed
+1 -2
@@ -277,8 +277,7 @@ class Cocos2dxGLSurfaceView(context: Context) : GLSurfaceView(context) {
return super.onGenericMotionEvent(event)
}
val action = event?.action?.and(MotionEvent.ACTION_MASK)
if (action == MotionEvent.ACTION_SCROLL) {
if (event?.action == MotionEvent.ACTION_SCROLL) {
val scrollX = event.getAxisValue(MotionEvent.AXIS_HSCROLL)
val scrollY = event.getAxisValue(MotionEvent.AXIS_VSCROLL)