Skip to content
Permalink
Browse files

Android: Support bypassing game file cache to parse file

  • Loading branch information...
stenzek committed Jul 18, 2019
1 parent a77b571 commit 6a6bbd707177d17702bb7327984dd6adeabb09af
@@ -11,6 +11,8 @@ private GameFile(long pointer)
mPointer = pointer;
}

public native static GameFile parse(String path);

@Override
public native void finalize();

@@ -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

0 comments on commit 6a6bbd7

Please sign in to comment.
You can’t perform that action at this time.