For plugin config v2 use the name from the config in the config menu

This commit is contained in:
Maschell 2024-03-02 10:02:27 +01:00
parent a66bd1f275
commit 8b215a5ea7

View File

@ -90,6 +90,8 @@ void ConfigUtils::displayMenu() {
} else if (callbackResult != WUPSCONFIG_API_RESULT_SUCCESS) { } else if (callbackResult != WUPSCONFIG_API_RESULT_SUCCESS) {
DEBUG_FUNCTION_LINE_ERR("Callback failed for %s: %s", info.name.c_str(), WUPSConfigAPI_GetStatusStr(callbackResult)); DEBUG_FUNCTION_LINE_ERR("Callback failed for %s: %s", info.name.c_str(), WUPSConfigAPI_GetStatusStr(callbackResult));
config.reset(); config.reset();
} else {
info.name = config->getName();
} }
} else { } else {
DEBUG_FUNCTION_LINE_ERR("Failed to create config for plugin: \"%s\"", info.name.c_str()); DEBUG_FUNCTION_LINE_ERR("Failed to create config for plugin: \"%s\"", info.name.c_str());
@ -115,7 +117,7 @@ void ConfigUtils::displayMenu() {
} }
} }
if (!config) { if (!config) {
config = make_unique_nothrow<WUPSConfigAPIBackend::WUPSConfig>("DUMMY"); config = make_unique_nothrow<WUPSConfigAPIBackend::WUPSConfig>(info.name);
} }
configs.emplace_back(info, std::move(config)); configs.emplace_back(info, std::move(config));