diff options
| author | Stenzek <stenzek@gmail.com> | 2019-07-18 20:42:09 +1000 |
|---|---|---|
| committer | Stenzek <stenzek@gmail.com> | 2019-07-18 22:35:12 +1000 |
| commit | 6a6bbd707177d17702bb7327984dd6adeabb09af (patch) | |
| tree | 1b11c6d9c5b6a09aee55a8c5372b66aeb16cfbd1 /Source/Android | |
| parent | a77b571da7a31fe30f35605a90d040325cb1e595 (diff) | |
Android: Support bypassing game file cache to parse file
Diffstat (limited to 'Source/Android')
| -rw-r--r-- | Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFile.java | 2 | ||||
| -rw-r--r-- | Source/Android/jni/GameList/GameFile.cpp | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFile.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFile.java index 5a247137ab..70be6cd080 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFile.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFile.java @@ -11,6 +11,8 @@ public class GameFile mPointer = pointer; } + public native static GameFile parse(String path); + @Override public native void finalize(); 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
|
