summaryrefslogtreecommitdiff
path: root/Source/Android/jni/GameList/GameFileCache.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2026-01-24 20:42:31 +0100
committerGitHub <noreply@github.com>2026-01-24 20:42:31 +0100
commit388b1e861cc42182c96fc78fb4bc41e87e84ef03 (patch)
tree4021975c7616c11f6176f167fcf5d1bff33a777b /Source/Android/jni/GameList/GameFileCache.cpp
parent1ef75021b6357762767515915eda1f3d3b4e5036 (diff)
parent60ca0626dfc2a59cc2e8145d0ee5c7d95f7d0ab5 (diff)
Merge pull request #14230 from Sintendo/file-search
Common/FileSearch: Refactor DoFileSearch
Diffstat (limited to 'Source/Android/jni/GameList/GameFileCache.cpp')
-rw-r--r--Source/Android/jni/GameList/GameFileCache.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/Android/jni/GameList/GameFileCache.cpp b/Source/Android/jni/GameList/GameFileCache.cpp
index 27c3b0ef63..c0a78c8cee 100644
--- a/Source/Android/jni/GameList/GameFileCache.cpp
+++ b/Source/Android/jni/GameList/GameFileCache.cpp
@@ -1,6 +1,8 @@
// Copyright 2018 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
+#include <algorithm>
+#include <iterator>
#include <memory>
#include <vector>
@@ -35,14 +37,16 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_model_GameFileCache_finali
JNIEXPORT jobjectArray JNICALL Java_org_dolphinemu_dolphinemu_model_GameFileCache_getAllGamePaths(
JNIEnv* env, jclass, jobjectArray folder_paths, jboolean recursive_scan)
{
- return VectorToJStringArray(
- env, UICommon::FindAllGamePaths(JStringArrayToVector(env, folder_paths), recursive_scan));
+ const std::vector<std::string> paths = JStringArrayToVector(env, folder_paths);
+ std::vector<std::string_view> path_views;
+ std::ranges::copy(paths, std::back_inserter(path_views));
+ return SpanToJStringArray(env, UICommon::FindAllGamePaths(path_views, recursive_scan));
}
JNIEXPORT jobjectArray JNICALL
Java_org_dolphinemu_dolphinemu_model_GameFileCache_getIsoPaths(JNIEnv* env, jclass)
{
- return VectorToJStringArray(env, Config::GetIsoPaths());
+ return SpanToJStringArray(env, Config::GetIsoPaths());
}
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_model_GameFileCache_setIsoPaths(