mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Android: Use JNI for getting post-processsing shaders
The Java implementation of getting the list of post-processing shaders only looked in the Sys folder and not the User folder. This could be fixed in the Java implementation, but it's simpler to just call the C++ implementation instead.
This commit is contained in:
@ -44,7 +44,7 @@ std::vector<std::string> JStringArrayToVector(JNIEnv* env, jobjectArray array)
|
||||
return result;
|
||||
}
|
||||
|
||||
jobjectArray JStringArrayFromVector(JNIEnv* env, std::vector<std::string> vector)
|
||||
jobjectArray VectorToJStringArray(JNIEnv* env, std::vector<std::string> vector)
|
||||
{
|
||||
jobjectArray result = env->NewObjectArray(vector.size(), IDCache::GetStringClass(), nullptr);
|
||||
for (jsize i = 0; i < vector.size(); ++i)
|
||||
@ -145,7 +145,7 @@ std::vector<std::string> DoFileSearchAndroidContent(const std::string& directory
|
||||
JNIEnv* env = IDCache::GetEnvForThread();
|
||||
jobject result = env->CallStaticObjectMethod(
|
||||
IDCache::GetContentHandlerClass(), IDCache::GetContentHandlerDoFileSearch(),
|
||||
ToJString(env, directory), JStringArrayFromVector(env, extensions), recursive);
|
||||
ToJString(env, directory), VectorToJStringArray(env, extensions), recursive);
|
||||
return JStringArrayToVector(env, reinterpret_cast<jobjectArray>(result));
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,9 @@
|
||||
|
||||
std::string GetJString(JNIEnv* env, jstring jstr);
|
||||
jstring ToJString(JNIEnv* env, const std::string& str);
|
||||
|
||||
std::vector<std::string> JStringArrayToVector(JNIEnv* env, jobjectArray array);
|
||||
jobjectArray VectorToJStringArray(JNIEnv* env, std::vector<std::string> vector);
|
||||
|
||||
// Returns true if the given path should be opened as Android content instead of a normal file.
|
||||
bool IsPathAndroidContent(const std::string& uri);
|
||||
|
Reference in New Issue
Block a user