Preserve disabled plugins when wiiloading a new plugin

This commit is contained in:
Maschell 2024-08-04 18:02:00 +02:00
parent 1ad4b7aada
commit b6cdc94ca1

View File

@ -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; return PLUGIN_BACKEND_API_ERROR_NONE;
} }