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

@@ -172,6 +172,9 @@ bool PluginManagement::doRelocations(const std::vector<PluginContainer> &plugins
bool PluginManagement::RestoreFunctionPatches(std::vector<PluginContainer> &plugins) {
for (auto &cur : std::ranges::reverse_view(plugins)) {
if (!cur.isLinkedAndLoaded()) {
continue;
}
for (auto &curFunction : std::ranges::reverse_view(cur.getPluginLinkInformation().getFunctionDataList())) {
if (!curFunction.RemovePatch()) {
DEBUG_FUNCTION_LINE_ERR("Failed to remove function patch for: plugin %s", cur.getMetaInformation().getName().c_str());