[Patcher] Fixed loading of disabled plugins
This commit is contained in:
parent
f743cf1e65
commit
dc29307a55
|
@ -140,15 +140,15 @@ std::vector<uint64_t> PluginLoader::GetHashes(
|
|||
|
||||
bool PluginLoader::IsAnyPluginForTitleAvailable(
|
||||
const uint32_t title_id, const uint64_t module_hash) const {
|
||||
const auto result =
|
||||
std::find_if(plugin_configs_.cbegin(), plugin_configs_.cend(),
|
||||
[title_id, module_hash](const PluginInfoEntry& entry) {
|
||||
const auto hash_exists =
|
||||
std::find(entry.hashes.cbegin(), entry.hashes.cend(),
|
||||
module_hash) != entry.hashes.cend();
|
||||
const auto result = std::find_if(
|
||||
plugin_configs_.cbegin(), plugin_configs_.cend(),
|
||||
[title_id, module_hash](const PluginInfoEntry& entry) {
|
||||
const auto hash_exists =
|
||||
std::find(entry.hashes.cbegin(), entry.hashes.cend(),
|
||||
module_hash) != entry.hashes.cend();
|
||||
|
||||
return entry.title_id == title_id && hash_exists;
|
||||
});
|
||||
return entry.is_enabled && entry.title_id == title_id && hash_exists;
|
||||
});
|
||||
|
||||
return result != plugin_configs_.cend();
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ void PluginLoader::LoadTitlePlugins(const uint32_t title_id) {
|
|||
std::copy_if(plugin_configs_.cbegin(), plugin_configs_.cend(),
|
||||
std::back_inserter(title_plugins),
|
||||
[title_id](const PluginInfoEntry& entry) {
|
||||
return entry.title_id == title_id;
|
||||
return entry.is_enabled && entry.title_id == title_id;
|
||||
});
|
||||
|
||||
if (title_plugins.empty()) {
|
||||
|
|
Loading…
Reference in New Issue