mirror of
https://github.com/rvtr/unlaunch-installer_dev.git
synced 2026-01-26 13:43:08 -05:00
Show the unlaunch version that is going to be installed
This commit is contained in:
parent
30b5e7017d
commit
027308e1f5
@ -73,16 +73,24 @@ static int mainMenu(int cursor)
|
||||
Menu* m = newMenu();
|
||||
setMenuHeader(m, "MAIN MENU");
|
||||
|
||||
char soundPatchesStr[64], tidPatchesStr[32];
|
||||
char soundPatchesStr[64], tidPatchesStr[32], installUnlaunchStr[32];
|
||||
sprintf(tidPatchesStr, "Disable all patches: %s",
|
||||
disableAllPatches ? "On" : "Off");
|
||||
sprintf(soundPatchesStr, "Enable sound and splash: %s",
|
||||
enableSoundAndSplash ? "On" : "Off");
|
||||
if(foundUnlaunchInstallerVersion != INVALID)
|
||||
{
|
||||
sprintf(installUnlaunchStr, "Install unlaunch (%s)", getUnlaunchVersionString(foundUnlaunchInstallerVersion));
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(installUnlaunchStr, "Install unlaunch");
|
||||
}
|
||||
addMenuItem(m, "Uninstall unlaunch", NULL, unlaunchFound, false);
|
||||
addMenuItem(m, "Custom background", NULL, foundUnlaunchInstallerVersion != INVALID, true);
|
||||
addMenuItem(m, tidPatchesStr, NULL, foundUnlaunchInstallerVersion == v1_9 || foundUnlaunchInstallerVersion == v2_0, false);
|
||||
addMenuItem(m, soundPatchesStr, NULL, foundUnlaunchInstallerVersion == v2_0 && !disableAllPatches && splashSoundBinaryPatchPath != NULL, false);
|
||||
addMenuItem(m, "Install unlaunch", NULL, foundUnlaunchInstallerVersion != INVALID && !unlaunchFound, false);
|
||||
addMenuItem(m, installUnlaunchStr, NULL, foundUnlaunchInstallerVersion != INVALID && !unlaunchFound, false);
|
||||
addMenuItem(m, "Exit", NULL, true, false);
|
||||
|
||||
m->cursor = cursor;
|
||||
|
||||
@ -530,6 +530,20 @@ UNLAUNCH_VERSION loadUnlaunchInstaller(const char* path)
|
||||
return INVALID;
|
||||
}
|
||||
|
||||
std::array unlaunchVersionStrings{
|
||||
"v1.8",
|
||||
"v1.9",
|
||||
"v2.0",
|
||||
"INVALID",
|
||||
};
|
||||
|
||||
static_assert(unlaunchVersionStrings.size() == (INVALID + 1));
|
||||
|
||||
const char* getUnlaunchVersionString(UNLAUNCH_VERSION version)
|
||||
{
|
||||
return unlaunchVersionStrings[version];
|
||||
}
|
||||
|
||||
bool installUnlaunch(bool retailConsole, const char* retailLauncherTmdPath, bool disableAllPatches, const char* splashSoundBinaryPatchPath, const char* customBackgroundPath)
|
||||
{
|
||||
if (installerVersion == INVALID || !patchUnlaunchInstaller(disableAllPatches, splashSoundBinaryPatchPath, customBackgroundPath))
|
||||
|
||||
@ -13,6 +13,8 @@ typedef enum UNLAUNCH_VERSION {
|
||||
INVALID,
|
||||
} UNLAUNCH_VERSION;
|
||||
|
||||
const char* getUnlaunchVersionString(UNLAUNCH_VERSION);
|
||||
|
||||
bool uninstallUnlaunch(bool notProto, bool hasHNAABackup, const char* retailLauncherTmdPath);
|
||||
bool installUnlaunch(bool retailConsole, const char* retailLauncherTmdPath, bool disableAllPatches, const char* splashSoundBinaryPatchPath, const char* customBackgroundPath);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user