MainAndroid: Don't set User directory redundantly
This commit is contained in:
parent
3e6e66b0d9
commit
b921f6cdef
|
@ -54,7 +54,6 @@ JavaVM* g_java_vm;
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
ANativeWindow* s_surf;
|
ANativeWindow* s_surf;
|
||||||
std::string s_set_userpath;
|
|
||||||
|
|
||||||
jclass s_jni_class;
|
jclass s_jni_class;
|
||||||
jmethodID s_jni_method_alert;
|
jmethodID s_jni_method_alert;
|
||||||
|
@ -677,9 +676,7 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetUserDirec
|
||||||
JNIEnv* env, jobject obj, jstring jDirectory)
|
JNIEnv* env, jobject obj, jstring jDirectory)
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
std::lock_guard<std::mutex> guard(s_host_identity_lock);
|
||||||
std::string directory = GetJString(env, jDirectory);
|
UICommon::SetUserDirectory(GetJString(env, jDirectory));
|
||||||
s_set_userpath = directory;
|
|
||||||
UICommon::SetUserDirectory(directory);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetUserDirectory(JNIEnv* env,
|
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetUserDirectory(JNIEnv* env,
|
||||||
|
@ -778,7 +775,6 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Run(JNIEnv*
|
||||||
RegisterMsgAlertHandler(&MsgAlert);
|
RegisterMsgAlertHandler(&MsgAlert);
|
||||||
|
|
||||||
std::unique_lock<std::mutex> guard(s_host_identity_lock);
|
std::unique_lock<std::mutex> guard(s_host_identity_lock);
|
||||||
UICommon::SetUserDirectory(s_set_userpath);
|
|
||||||
UICommon::Init();
|
UICommon::Init();
|
||||||
|
|
||||||
WiimoteReal::InitAdapterClass();
|
WiimoteReal::InitAdapterClass();
|
||||||
|
|
Loading…
Reference in New Issue