Silly me. They all return floats
.
AMotionEvent_getX(event,0)
AMotionEvent_getY(event,0)
AMotionEvent_getFlags(event)
AMotionEvent_getXPrecision(event)
AMotionEvent_getYPrecision(event)
AMotionEvent_getXOffset(event)
AMotionEvent_getYOffset(event)
If I use them as floats with %f
, this is my output:
I/libplasma(29039): Event: action=1
I/libplasma(29039): keyCode=0
I/libplasma(29039): metaState=0x0
I/libplasma(29039): Action=0x1
I/libplasma(29039): x=1513.833618
I/libplasma(29039): y=697.899841
I/libplasma(29039): flags=0x0
I/libplasma(29039): xprec=1.533854
I/libplasma(29039): yprec=1.547500
I/libplasma(29039): xoff=0.000000
I/libplasma(29039): yoff=0.000000
If someone in the future runs into this issue, please make sure to open up the source file android/input.h
for information on each function. By default, this will be located at <NDK-Install-Path>/platforms/<ndk-platform>/arch-arm/usr/include/android/input.h
.