mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-19 08:41:39 +00:00
Android: Support change disc
This commit is contained in:
parent
e2dbf10ee5
commit
c9dc585dcb
8 changed files with 79 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue