api-impl: implement accelerometer support, no backend yet

currently x,y,z values are hardcoded and can only be changed with gdb
This commit is contained in:
Mis012
2024-03-16 15:04:02 +01:00
parent 6443e3977c
commit 20b179387b
7 changed files with 80 additions and 4 deletions

View File

@@ -85,6 +85,9 @@ void set_up_handle_cache(JNIEnv *env)
handle_cache.motion_event.class = _REF((*env)->FindClass(env, "android/view/MotionEvent"));
handle_cache.motion_event.constructor = _METHOD(handle_cache.motion_event.class, "<init>", "(IIFFJFF)V");
handle_cache.sensor_event.class = _REF((*env)->FindClass(env, "android/hardware/SensorEvent"));
handle_cache.sensor_event.constructor = _METHOD(handle_cache.sensor_event.class, "<init>", "([FLandroid/hardware/Sensor;)V");
handle_cache.canvas.class = _REF((*env)->FindClass(env, "android/graphics/Canvas"));
handle_cache.canvas.constructor = _METHOD(handle_cache.canvas.class, "<init>", "(JJ)V");