diff options
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/Android/Android.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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)); +} } |
