Android: Use VectorToJStringArray in GameFileCache.cpp

This commit is contained in:
JosJuice 2021-05-24 22:07:31 +02:00
parent c1c17339ff
commit 90cf0d60f8
1 changed files with 1 additions and 13 deletions

View File

@ -69,20 +69,8 @@ JNIEXPORT jobject JNICALL Java_org_dolphinemu_dolphinemu_model_GameFileCache_add
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_model_GameFileCache_update(
JNIEnv* env, jobject obj, jobjectArray folder_paths, jboolean recursive_scan)
{
jsize size = env->GetArrayLength(folder_paths);
std::vector<std::string> folder_paths_vector;
folder_paths_vector.reserve(size);
for (jsize i = 0; i < size; ++i)
{
const auto path = reinterpret_cast<jstring>(env->GetObjectArrayElement(folder_paths, i));
folder_paths_vector.push_back(GetJString(env, path));
env->DeleteLocalRef(path);
}
return GetPointer(env, obj)->Update(
UICommon::FindAllGamePaths(folder_paths_vector, recursive_scan));
UICommon::FindAllGamePaths(JStringArrayToVector(env, folder_paths), recursive_scan));
}
JNIEXPORT jboolean JNICALL