Loading core/jni/android_view_MotionEvent.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -763,7 +763,12 @@ static void android_view_MotionEvent_nativeScale(jlong nativePtr, jfloat scale) static jint android_view_MotionEvent_nativeGetSurfaceRotation(jlong nativePtr) { MotionEvent* event = reinterpret_cast<MotionEvent*>(nativePtr); return jint(event->getSurfaceRotation()); auto rotation = event->getSurfaceRotation(); if (rotation) { return static_cast<jint>(rotation.value()); } else { return -1; } } // ---------------------------------------------------------------------------- Loading Loading
core/jni/android_view_MotionEvent.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -763,7 +763,12 @@ static void android_view_MotionEvent_nativeScale(jlong nativePtr, jfloat scale) static jint android_view_MotionEvent_nativeGetSurfaceRotation(jlong nativePtr) { MotionEvent* event = reinterpret_cast<MotionEvent*>(nativePtr); return jint(event->getSurfaceRotation()); auto rotation = event->getSurfaceRotation(); if (rotation) { return static_cast<jint>(rotation.value()); } else { return -1; } } // ---------------------------------------------------------------------------- Loading