summaryrefslogtreecommitdiff
path: root/Source/Android/jni/GameList/GameFile.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2019-07-18 20:42:09 +1000
committerStenzek <stenzek@gmail.com>2019-07-18 22:35:12 +1000
commit6a6bbd707177d17702bb7327984dd6adeabb09af (patch)
tree1b11c6d9c5b6a09aee55a8c5372b66aeb16cfbd1 /Source/Android/jni/GameList/GameFile.cpp
parenta77b571da7a31fe30f35605a90d040325cb1e595 (diff)
Android: Support bypassing game file cache to parse file
Diffstat (limited to 'Source/Android/jni/GameList/GameFile.cpp')
-rw-r--r--Source/Android/jni/GameList/GameFile.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/Android/jni/GameList/GameFile.cpp b/Source/Android/jni/GameList/GameFile.cpp
index ee889709fd..b9f7a28df4 100644
--- a/Source/Android/jni/GameList/GameFile.cpp
+++ b/Source/Android/jni/GameList/GameFile.cpp
@@ -165,6 +165,17 @@ JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_model_GameFile_getBannerHe
return static_cast<jint>(GetRef(env, obj)->GetBannerImage().height);
}
+JNIEXPORT jobject JNICALL Java_org_dolphinemu_dolphinemu_model_GameFile_parse(JNIEnv* env,
+ jobject obj,
+ jstring path)
+{
+ auto game_file = std::make_shared<UICommon::GameFile>(GetJString(env, path));
+ if (!game_file->IsValid())
+ game_file.reset();
+
+ return GameFileToJava(env, game_file);
+}
+
#ifdef __cplusplus
}
#endif