From c8b8a60033bb35917c10eeb5c4043ee428ae61a6 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Wed, 20 Nov 2019 19:40:47 +0100 Subject: Android: Let WiimoteEmu know whether we have accelerometer/gyroscope --- Source/Android/jni/MainAndroid.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Source/Android/jni/MainAndroid.cpp') diff --git a/Source/Android/jni/MainAndroid.cpp b/Source/Android/jni/MainAndroid.cpp index aa197f7e5e..d998097fee 100644 --- a/Source/Android/jni/MainAndroid.cpp +++ b/Source/Android/jni/MainAndroid.cpp @@ -47,6 +47,8 @@ #include "DiscIO/Enums.h" #include "DiscIO/Volume.h" +#include "InputCommon/ControllerInterface/Android/Android.h" + #include "UICommon/UICommon.h" #include "VideoCommon/OnScreenDisplay.h" @@ -200,6 +202,8 @@ JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onGamePa JNIEnv* env, jobject obj, jstring jDevice, jint Button, jint Action); JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onGamePadMoveEvent( JNIEnv* env, jobject obj, jstring jDevice, jint Axis, jfloat Value); +JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetMotionSensorsEnabled( + JNIEnv* env, jobject obj, jboolean accelerometer_enabled, jboolean gyroscope_enabled); JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetVersionString(JNIEnv* env, jobject obj); JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetGitRevision(JNIEnv* env, @@ -308,6 +312,12 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onGamePadMov ButtonManager::GamepadAxisEvent(GetJString(env, jDevice), Axis, Value); } +JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetMotionSensorsEnabled( + JNIEnv* env, jobject obj, jboolean accelerometer_enabled, jboolean gyroscope_enabled) +{ + ciface::Android::SetMotionSensorsEnabled(accelerometer_enabled, gyroscope_enabled); +} + JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetVersionString(JNIEnv* env, jobject obj) { -- cgit v1.2.3