From c2779aef060137d9062cfd29babb3c43fc5fa2b5 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Tue, 27 Dec 2022 16:29:01 +0100 Subject: Android: Add the advanced input mapping dialog It's missing a lot of features from the PC version for now, like buttons for inserting functions and the ability to see what the expression evaluates to. I mostly just wanted to get something in place so you can set up rumble. Co-authored-by: Charles Lombardo --- .../Core/InputCommon/ControllerInterface/Android/Android.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Source/Core/InputCommon/ControllerInterface') diff --git a/Source/Core/InputCommon/ControllerInterface/Android/Android.cpp b/Source/Core/InputCommon/ControllerInterface/Android/Android.cpp index d2ccec4bb3..a4bd7a3d46 100644 --- a/Source/Core/InputCommon/ControllerInterface/Android/Android.cpp +++ b/Source/Core/InputCommon/ControllerInterface/Android/Android.cpp @@ -25,6 +25,7 @@ #include "jni/AndroidCommon/AndroidCommon.h" #include "jni/AndroidCommon/IDCache.h" +#include "jni/Input/CoreDevice.h" namespace { @@ -1129,4 +1130,13 @@ Java_org_dolphinemu_dolphinemu_features_input_model_ControllerInterface_getAllDe { return VectorToJStringArray(env, g_controller_interface.GetAllDeviceStrings()); } + +JNIEXPORT jobject JNICALL +Java_org_dolphinemu_dolphinemu_features_input_model_ControllerInterface_getDevice( + JNIEnv* env, jclass, jstring j_device_string) +{ + ciface::Core::DeviceQualifier qualifier; + qualifier.FromString(GetJString(env, j_device_string)); + return CoreDeviceToJava(env, g_controller_interface.FindDevice(qualifier)); +} } -- cgit v1.2.3