Android: Support bypassing game file cache to parse file
This commit is contained in:
parent
a77b571da7
commit
6a6bbd7071
|
@ -11,6 +11,8 @@ public class GameFile
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue