Android: Show a message when adding a folder with no games

To catch people who try to use unsupported formats.
This commit is contained in:
JosJuice
2020-11-08 23:01:59 +01:00
parent 399ede37a6
commit 73855168f3
7 changed files with 69 additions and 23 deletions

View File

@ -124,9 +124,9 @@ std::string GetAndroidContentDisplayName(const std::string& uri)
std::vector<std::string> GetAndroidContentChildNames(const std::string& uri)
{
JNIEnv* env = IDCache::GetEnvForThread();
jobject children =
env->CallStaticObjectMethod(IDCache::GetContentHandlerClass(),
IDCache::GetContentHandlerGetChildNames(), ToJString(env, uri));
jobject children = env->CallStaticObjectMethod(IDCache::GetContentHandlerClass(),
IDCache::GetContentHandlerGetChildNames(),
ToJString(env, uri), false);
return JStringArrayToVector(env, reinterpret_cast<jobjectArray>(children));
}

View File

@ -35,7 +35,7 @@ jlong GetAndroidContentSizeAndIsDirectory(const std::string& uri);
// An empty string will be returned for files which do not exist.
std::string GetAndroidContentDisplayName(const std::string& uri);
// Returns the display names of all children of a directory.
// Returns the display names of all children of a directory, non-recursively.
std::vector<std::string> GetAndroidContentChildNames(const std::string& uri);
int GetNetworkIpAddress();

View File

@ -330,7 +330,7 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved)
s_content_handler_get_display_name = env->GetStaticMethodID(
s_content_handler_class, "getDisplayName", "(Ljava/lang/String;)Ljava/lang/String;");
s_content_handler_get_child_names = env->GetStaticMethodID(
s_content_handler_class, "getChildNames", "(Ljava/lang/String;)[Ljava/lang/String;");
s_content_handler_class, "getChildNames", "(Ljava/lang/String;Z)[Ljava/lang/String;");
const jclass network_helper_class =
env->FindClass("org/dolphinemu/dolphinemu/utils/NetworkHelper");