You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
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:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user