From fb97f0353ded60d26628eead4ed5b6e5c4f15a71 Mon Sep 17 00:00:00 2001 From: Maschell Date: Sat, 23 Mar 2024 20:19:53 +0100 Subject: [PATCH] Init WUPSBackend on plugin init --- src/main.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index b2fefd8..f7dd395 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -9,6 +9,7 @@ #include #include #include +#include WUPS_PLUGIN_NAME("Wiiload"); WUPS_PLUGIN_DESCRIPTION("Wiiload Server"); @@ -35,10 +36,20 @@ INITIALIZE_PLUGIN() { } else { NotificationModule_SetDefaultValue(NOTIFICATION_MODULE_NOTIFICATION_TYPE_ERROR, NOTIFICATION_MODULE_DEFAULT_OPTION_DURATION_BEFORE_FADE_OUT, 10.0f); } + PluginBackendApiErrorType res2; + if ((res2 = WUPSBackend_InitLibrary()) != PLUGIN_BACKEND_API_ERROR_NONE) { + DEBUG_FUNCTION_LINE_WARN("Failed to init WUPSBackend Api: %s", WUPSBackend_GetStatusStr(res2)); + } InitConfigAndStorage(); } +DEINITIALIZE_PLUGIN() { + RPXLoader_DeInitLibrary(); + NotificationModule_DeInitLibrary(); + WUPSBackend_DeInitLibrary(); +} + /* Entry point */ ON_APPLICATION_START() { initLogging();