diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2016-02-04 18:31:36 -0600 |
|---|---|---|
| committer | Ryan Houdek <Sonicadvance1@gmail.com> | 2016-02-07 05:31:48 -0600 |
| commit | fe53461611d86384478064be6b4297a7c7e437e1 (patch) | |
| tree | 67ac77af74e6ca92a5159ea90b1e2025f4a95427 /Source/Android/jni/MainAndroid.cpp | |
| parent | 2282651fdb7bee30694f03cac74c379335655fad (diff) | |
[Android] Implement support for real Wiimotes with the DolphinBar
This is the only way to get Wiimotes working under Android now.
This, just like the Wii U Gamecube Controller Adapter, completely goes around Android's limitations and talks with the device directly through USBManager.
Couple notes.
Continuous scanning must be enabled otherwise the Wiimotes won't be seen.
The UI doesn't expose support for this yet. One must change the Wiimote source and continuous scanning settings manually.
Testing up to two wiimotes in Taiko No Tatsujin, no reason to believe all four won't work.
Diffstat (limited to 'Source/Android/jni/MainAndroid.cpp')
| -rw-r--r-- | Source/Android/jni/MainAndroid.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Android/jni/MainAndroid.cpp b/Source/Android/jni/MainAndroid.cpp index ffa0eca40a..7d2849c96e 100644 --- a/Source/Android/jni/MainAndroid.cpp +++ b/Source/Android/jni/MainAndroid.cpp @@ -27,6 +27,7 @@ #include "Core/Host.h" #include "Core/State.h" #include "Core/HW/Wiimote.h" +#include "Core/HW/WiimoteReal/WiimoteReal.h" #include "Core/PowerPC/JitInterface.h" #include "Core/PowerPC/PowerPC.h" #include "Core/PowerPC/Profiler.h" @@ -632,6 +633,10 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SurfaceDestr Renderer::s_ChangedSurface.Wait(); } } +JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_RefreshWiimotes(JNIEnv *env, jobject obj) +{ + WiimoteReal::Refresh(); +} JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Run(JNIEnv *env, jobject obj) { @@ -646,6 +651,8 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Run(JNIEnv * UICommon::SetUserDirectory(g_set_userpath); UICommon::Init(); + WiimoteReal::InitAdapterClass(); + // No use running the loop when booting fails if ( BootManager::BootCore( g_filename.c_str() ) ) { |
