summaryrefslogtreecommitdiff
path: root/Source/Android/jni/MainAndroid.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2017-12-27 17:34:24 +0100
committerGitHub <noreply@github.com>2017-12-27 17:34:24 +0100
commit1df69c57507dbeea638eceac1c7410b737f1739c (patch)
treeb0ad19e5bfbd175ca4523f923531d332504b5592 /Source/Android/jni/MainAndroid.cpp
parent3bc61ed3635f5932cad8b460812ad8545aada4da (diff)
parent152f7fa35c0647f5203bf644959291bbaebd0f3c (diff)
Merge pull request #6051 from JosJuice/android-sys
Android: Extract Sys to a different folder than the User folder
Diffstat (limited to 'Source/Android/jni/MainAndroid.cpp')
-rw-r--r--Source/Android/jni/MainAndroid.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/Source/Android/jni/MainAndroid.cpp b/Source/Android/jni/MainAndroid.cpp
index 3e128997b4..9fc8781cfa 100644
--- a/Source/Android/jni/MainAndroid.cpp
+++ b/Source/Android/jni/MainAndroid.cpp
@@ -432,6 +432,8 @@ JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetPlatform(
jstring jFilename);
JNIEXPORT jstring JNICALL
Java_org_dolphinemu_dolphinemu_NativeLibrary_GetVersionString(JNIEnv* env, jobject obj);
+JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetGitRevision(JNIEnv* env,
+ jobject obj);
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveScreenShot(JNIEnv* env,
jobject obj);
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_eglBindAPI(JNIEnv* env,
@@ -450,8 +452,9 @@ 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_services_DirectoryInitializationService_CreateUserDirectories(
+ JNIEnv* env, jobject obj);
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetUserDirectory(
JNIEnv* env, jobject obj, jstring jDirectory);
JNIEXPORT jstring JNICALL
@@ -588,6 +591,12 @@ JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetVersio
return env->NewStringUTF(Common::scm_rev_str.c_str());
}
+JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetGitRevision(JNIEnv* env,
+ jobject obj)
+{
+ return env->NewStringUTF(Common::scm_rev_git_str.c_str());
+}
+
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveScreenShot(JNIEnv* env,
jobject obj)
{
@@ -649,28 +658,19 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_LoadState(JN
State::Load(slot);
}
-JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_CreateUserFolders(JNIEnv* env,
- jobject obj)
+JNIEXPORT void JNICALL
+Java_org_dolphinemu_dolphinemu_services_DirectoryInitializationService_SetSysDirectory(
+ JNIEnv* env, jobject obj, jstring jPath)
+{
+ const std::string path = GetJString(env, jPath);
+ File::SetSysDirectory(path);
+}
+
+JNIEXPORT void JNICALL
+Java_org_dolphinemu_dolphinemu_services_DirectoryInitializationService_CreateUserDirectories(
+ JNIEnv* env, jobject obj)
{
- File::CreateFullPath(File::GetUserPath(D_CONFIG_IDX));
- File::CreateFullPath(File::GetUserPath(D_GCUSER_IDX));
- File::CreateFullPath(File::GetUserPath(D_WIIROOT_IDX) + DIR_SEP WII_WC24CONF_DIR DIR_SEP
- "mbox" DIR_SEP);
- File::CreateFullPath(File::GetUserPath(D_WIIROOT_IDX) + DIR_SEP "shared2" DIR_SEP
- "succession" DIR_SEP);
- File::CreateFullPath(File::GetUserPath(D_WIIROOT_IDX) + DIR_SEP "shared2" DIR_SEP "ec" DIR_SEP);
- File::CreateFullPath(File::GetUserPath(D_WIIROOT_IDX) + DIR_SEP WII_SYSCONF_DIR DIR_SEP);
- File::CreateFullPath(File::GetUserPath(D_CACHE_IDX));
- File::CreateFullPath(File::GetUserPath(D_DUMPDSP_IDX));
- File::CreateFullPath(File::GetUserPath(D_DUMPTEXTURES_IDX));
- File::CreateFullPath(File::GetUserPath(D_HIRESTEXTURES_IDX));
- File::CreateFullPath(File::GetUserPath(D_SCREENSHOTS_IDX));
- File::CreateFullPath(File::GetUserPath(D_STATESAVES_IDX));
- File::CreateFullPath(File::GetUserPath(D_MAILLOGS_IDX));
- File::CreateFullPath(File::GetUserPath(D_SHADERS_IDX) + "Anaglyph" DIR_SEP);
- File::CreateFullPath(File::GetUserPath(D_GCUSER_IDX) + USA_DIR DIR_SEP);
- File::CreateFullPath(File::GetUserPath(D_GCUSER_IDX) + EUR_DIR DIR_SEP);
- File::CreateFullPath(File::GetUserPath(D_GCUSER_IDX) + JAP_DIR DIR_SEP);
+ UICommon::CreateDirectories();
}
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetUserDirectory(