mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-04 07:09:03 +00:00
WiiUtils: Add function to get current system menu version
This commit is contained in:
parent
36257f7f42
commit
30d51348f9
2 changed files with 16 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue