WiiUtils: Add function to get current system menu version
This commit is contained in:
parent
36257f7f42
commit
30d51348f9
|
@ -29,4 +29,6 @@ public final class WiiUtils
|
||||||
public static native int doOnlineUpdate(String region, WiiUpdateCallback callback);
|
public static native int doOnlineUpdate(String region, WiiUpdateCallback callback);
|
||||||
|
|
||||||
public static native boolean isSystemMenuInstalled();
|
public static native boolean isSystemMenuInstalled();
|
||||||
|
|
||||||
|
public static native String getSystemMenuVersion();
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,4 +140,18 @@ Java_org_dolphinemu_dolphinemu_utils_WiiUtils_isSystemMenuInstalled(JNIEnv* env,
|
||||||
|
|
||||||
return tmd.IsValid();
|
return tmd.IsValid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JNIEXPORT jstring JNICALL
|
||||||
|
Java_org_dolphinemu_dolphinemu_utils_WiiUtils_getSystemMenuVersion(JNIEnv* env, jclass)
|
||||||
|
{
|
||||||
|
IOS::HLE::Kernel ios;
|
||||||
|
const auto tmd = ios.GetES()->FindInstalledTMD(Titles::SYSTEM_MENU);
|
||||||
|
|
||||||
|
if (!tmd.IsValid())
|
||||||
|
{
|
||||||
|
return ToJString(env, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
return ToJString(env, DiscIO::GetSysMenuVersionString(tmd.GetTitleVersion()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue