Unload unactive plugin when wiiloading a plugin with the same name and author

This commit is contained in:
Maschell
2025-02-02 12:50:53 +01:00
parent b031576757
commit 5321272924
5 changed files with 93 additions and 8 deletions

View File

@@ -146,6 +146,9 @@ namespace WUPSConfigAPIBackend {
return WUPSCONFIG_API_RESULT_INVALID_ARGUMENT;
}
for (auto &cur : gLoadedPlugins) {
if (!cur.isLinkedAndLoaded()) {
continue;
}
if (cur.getHandle() == pluginIdentifier) {
if (options.version != 1) {
return WUPSCONFIG_API_RESULT_UNSUPPORTED_VERSION;