mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 15:19:42 -06:00
ResourcePacks: Fix various bugs
This commit is contained in:
@ -60,7 +60,8 @@ bool Init()
|
||||
continue;
|
||||
}
|
||||
|
||||
order->Set(packs[i].GetManifest()->GetID(), static_cast<u64>(i));
|
||||
if (i < packs.size())
|
||||
order->Set(packs[i].GetManifest()->GetID(), static_cast<u64>(i));
|
||||
}
|
||||
|
||||
file.Save(packs_path);
|
||||
|
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user