mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 20:58:54 +00:00
ResourcePacks: Fix various bugs
This commit is contained in:
parent
2987e8313a
commit
f86b34ceb9
4 changed files with 30 additions and 15 deletions
|
@ -265,8 +265,9 @@ bool ResourcePack::Uninstall(const std::string& path)
|
|||
// Check if a higher priority pack already provides a given texture, don't delete it
|
||||
for (const auto& pack : GetHigherPriorityPacks(*this))
|
||||
{
|
||||
if (std::find(pack->GetTextures().begin(), pack->GetTextures().end(), texture) !=
|
||||
pack->GetTextures().end())
|
||||
if (::ResourcePack::IsInstalled(*pack) &&
|
||||
std::find(pack->GetTextures().begin(), pack->GetTextures().end(), texture) !=
|
||||
pack->GetTextures().end())
|
||||
{
|
||||
provided_by_other_pack = true;
|
||||
break;
|
||||
|
@ -279,8 +280,9 @@ bool ResourcePack::Uninstall(const std::string& path)
|
|||
// Check if a lower priority pack provides a given texture - if so, install it.
|
||||
for (auto& pack : lower)
|
||||
{
|
||||
if (std::find(pack->GetTextures().rbegin(), pack->GetTextures().rend(), texture) !=
|
||||
pack->GetTextures().rend())
|
||||
if (::ResourcePack::IsInstalled(*pack) &&
|
||||
std::find(pack->GetTextures().rbegin(), pack->GetTextures().rend(), texture) !=
|
||||
pack->GetTextures().rend())
|
||||
{
|
||||
pack->Install(path);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue