WiiUtils: Add function to check if system menu is installed

This commit is contained in:
OatmealDome 2022-01-09 15:57:07 -05:00
parent 2fc7671eaf
commit 36257f7f42
2 changed files with 14 additions and 0 deletions

View File

@ -27,4 +27,6 @@ public final class WiiUtils
public static native void importNANDBin(String file);
public static native int doOnlineUpdate(String region, WiiUpdateCallback callback);
public static native boolean isSystemMenuInstalled();
}

View File

@ -9,7 +9,10 @@
#include "jni/AndroidCommon/IDCache.h"
#include "Common/ScopeGuard.h"
#include "Core/CommonTitles.h"
#include "Core/HW/WiiSave.h"
#include "Core/IOS/ES/ES.h"
#include "Core/IOS/IOS.h"
#include "Core/WiiUtils.h"
#include "DiscIO/NANDImporter.h"
@ -128,4 +131,13 @@ JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_utils_WiiUtils_doOnlineUpd
return ConvertUpdateResult(result);
}
JNIEXPORT jboolean JNICALL
Java_org_dolphinemu_dolphinemu_utils_WiiUtils_isSystemMenuInstalled(JNIEnv* env, jclass)
{
IOS::HLE::Kernel ios;
const auto tmd = ios.GetES()->FindInstalledTMD(Titles::SYSTEM_MENU);
return tmd.IsValid();
}
}