From b6cdc94ca128c4d3ce42acdc08ef0dbf04b17f56 Mon Sep 17 00:00:00 2001 From: Maschell Date: Sun, 4 Aug 2024 18:02:00 +0200 Subject: [PATCH] Preserve disabled plugins when wiiloading a new plugin --- source/utils/exports.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/utils/exports.cpp b/source/utils/exports.cpp index d51c715..5c3b667 100644 --- a/source/utils/exports.cpp +++ b/source/utils/exports.cpp @@ -41,6 +41,14 @@ extern "C" PluginBackendApiErrorType WUPSLoadAndLinkByDataHandle(const wups_back } } + // TODO: What happens when we wiiload a new version of an inactive plugin? Do we consider that a problem? + // add all loaded plugins that are not active as inactive + for (const auto &plugin : gLoadedPlugins) { + if (!plugin.isLinkedAndLoaded()) { + gLoadOnNextLaunch.emplace_back(plugin.getPluginDataCopy(), false); + } + } + return PLUGIN_BACKEND_API_ERROR_NONE; }