diff options
| author | Léo Lam <leolino.lam@gmail.com> | 2018-01-24 12:07:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-24 12:07:10 +0100 |
| commit | 9a166dca572d7220c345df030921bbd466381c91 (patch) | |
| tree | 38b3e5748901ec4aa7a86b79d89a9c0823fa5485 /Source/Android/jni/MainAndroid.cpp | |
| parent | 5223831c7b86408397559060f53b0ab49ec11dd8 (diff) | |
| parent | c9dc585dcbc2e99d2032a5ef1c1212c72044ea1d (diff) | |
Merge pull request #6313 from mahdihijazi/support_change_disc
Android: Support change disc
Diffstat (limited to 'Source/Android/jni/MainAndroid.cpp')
| -rw-r--r-- | Source/Android/jni/MainAndroid.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/Android/jni/MainAndroid.cpp b/Source/Android/jni/MainAndroid.cpp index 85cea2092a..ad0c0cb7c6 100644 --- a/Source/Android/jni/MainAndroid.cpp +++ b/Source/Android/jni/MainAndroid.cpp @@ -32,6 +32,7 @@ #include "Core/BootManager.h" #include "Core/ConfigManager.h" #include "Core/Core.h" +#include "Core/HW/DVD/DVDInterface.h" #include "Core/HW/Wiimote.h" #include "Core/HW/WiimoteReal/WiimoteReal.h" #include "Core/Host.h" @@ -520,6 +521,10 @@ JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_IsRunnin return Core::IsRunning(); } +JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ChangeDisc(JNIEnv* env, + jobject obj, + jstring jFile); + JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onGamePadEvent( JNIEnv* env, jobject obj, jstring jDevice, jint Button, jint Action) { @@ -869,6 +874,15 @@ Java_org_dolphinemu_dolphinemu_NativeLibrary_Run__Ljava_lang_String_2Ljava_lang_ Run(GetJString(env, jFile), GetJString(env, jSavestate), jDeleteSavestate); } +JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ChangeDisc(JNIEnv* env, + jobject obj, + jstring jFile) +{ + const std::string path = GetJString(env, jFile); + __android_log_print(ANDROID_LOG_INFO, DOLPHIN_TAG, "Change Disc: %s", path.c_str()); + Core::RunAsCPUThread([&path] { DVDInterface::ChangeDisc(path); }); +} + #ifdef __cplusplus } #endif |
