From 8b215a5ea7b3d8fe7101259c6d6445a44d44291a Mon Sep 17 00:00:00 2001 From: Maschell Date: Sat, 2 Mar 2024 10:02:27 +0100 Subject: [PATCH] For plugin config v2 use the name from the config in the config menu --- source/utils/config/ConfigUtils.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/utils/config/ConfigUtils.cpp b/source/utils/config/ConfigUtils.cpp index 21ff8d1..46b1fc0 100644 --- a/source/utils/config/ConfigUtils.cpp +++ b/source/utils/config/ConfigUtils.cpp @@ -90,6 +90,8 @@ void ConfigUtils::displayMenu() { } else if (callbackResult != WUPSCONFIG_API_RESULT_SUCCESS) { DEBUG_FUNCTION_LINE_ERR("Callback failed for %s: %s", info.name.c_str(), WUPSConfigAPI_GetStatusStr(callbackResult)); config.reset(); + } else { + info.name = config->getName(); } } else { DEBUG_FUNCTION_LINE_ERR("Failed to create config for plugin: \"%s\"", info.name.c_str()); @@ -115,7 +117,7 @@ void ConfigUtils::displayMenu() { } } if (!config) { - config = make_unique_nothrow("DUMMY"); + config = make_unique_nothrow(info.name); } configs.emplace_back(info, std::move(config));