mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-02 16:32:55 +00:00
[Android] Support arguments from Activity Monitor.
Activity Monitor can start activities by using adb to invoke it. This will allow us to set the user directory and autostart file from adb. adb shell am start -n org.dolphinemu.dolphinemu/.gamelist.GameListActivity -e AutoStartFile /sdcard/AC.gcz -e UserDir /sdcard/dolphin-emu2/ This allows more automated testing to be done with Dolphin on Android.
This commit is contained in:
parent
61591db916
commit
c2b2e03f73
4 changed files with 71 additions and 2 deletions
|
@ -233,6 +233,7 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveState(JN
|
|||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_LoadState(JNIEnv *env, jobject obj, jint slot);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_CreateUserFolders(JNIEnv *env, jobject obj);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetUserDirectory(JNIEnv *env, jobject obj, jstring jDirectory);
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetUserDirectory(JNIEnv *env, jobject obj);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Run(JNIEnv *env, jobject obj, jobject _surf);
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_UnPauseEmulation(JNIEnv *env, jobject obj)
|
||||
|
@ -370,6 +371,11 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetUserDirec
|
|||
UICommon::SetUserDirectory(directory);
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetUserDirectory(JNIEnv *env, jobject obj)
|
||||
{
|
||||
return env->NewStringUTF(File::GetUserPath(D_USER_IDX).c_str());
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Run(JNIEnv *env, jobject obj, jobject _surf)
|
||||
{
|
||||
surf = ANativeWindow_fromSurface(env, _surf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue