Fix config menu

This commit is contained in:
Maschell 2023-12-26 14:54:21 +01:00
parent 85288e1bf5
commit 2078522898
3 changed files with 17 additions and 3 deletions

View File

@ -13,7 +13,7 @@
#include <utils/logger.h>
#include <wups.h>
WUPS_PLUGIN_NAME("AromaBasePlugin");
WUPS_PLUGIN_NAME("Aroma Base Plugin");
WUPS_PLUGIN_DESCRIPTION("Implements small patches and checks for Aroma updates.");
WUPS_PLUGIN_VERSION(PLUGIN_VERSION_FULL);
WUPS_PLUGIN_AUTHOR("Maschell");
@ -82,6 +82,8 @@ INITIALIZE_PLUGIN() {
}
InitConfigValuesFromStorage();
InitConfigMenu();
}
ON_APPLICATION_START() {

View File

@ -41,7 +41,6 @@ WUPSConfigAPICallbackStatus ConfigMenuOpenedCallback(WUPSConfigCategoryHandle ro
auto menuPatches = WUPSConfigCategory::Create("Wii U Menu patches");
menuPatches.add(WUPSConfigItemBoolean::Create(USTEALTH_CONFIG_ID,
"Avoid \"Format\" dialog on Wii U Menu",
ACTIVATE_USTEALTH_DEFAULT, gActivateUStealth,
@ -73,3 +72,14 @@ WUPSConfigAPICallbackStatus ConfigMenuOpenedCallback(WUPSConfigCategoryHandle ro
}
return WUPSCONFIG_API_CALLBACK_RESULT_SUCCESS;
}
void ConfigMenuClosedCallback() {
WUPSStorageAPI::SaveStorage();
}
void InitConfigMenu() {
WUPSConfigAPIOptionsV1 configOptions = {.name = "Aroma Base Plugin"};
if (WUPSConfigAPI_Init(configOptions, ConfigMenuOpenedCallback, ConfigMenuClosedCallback) != WUPSCONFIG_API_RESULT_SUCCESS) {
DEBUG_FUNCTION_LINE_ERR("Failed to init config api");
}
}

View File

@ -30,3 +30,5 @@ extern std::string gLastHash;
extern bool gUpdateChecked;
extern bool gForceNDMSuspendSuccess;
extern bool gAllowErrorNotifications;
void InitConfigMenu();