mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-24 22:34:54 +00:00
Merge pull request #12094 from iwubcode/fix_texture_order_regression
VideoCommon: fix regression with texture load order
This commit is contained in:
commit
44c90aa3fc
1 changed files with 15 additions and 12 deletions
|
@ -120,24 +120,27 @@ void HiresTexture::Update()
|
||||||
if (has_arbitrary_mipmaps)
|
if (has_arbitrary_mipmaps)
|
||||||
filename.erase(arb_index, 4);
|
filename.erase(arb_index, 4);
|
||||||
|
|
||||||
// Since this is just a texture (single file) the mapper doesn't really matter
|
|
||||||
// just provide a string
|
|
||||||
s_file_library->SetAssetIDMapData(filename,
|
|
||||||
std::map<std::string, std::filesystem::path>{{"", path}});
|
|
||||||
|
|
||||||
if (g_ActiveConfig.bCacheHiresTextures)
|
|
||||||
{
|
|
||||||
auto hires_texture = std::make_shared<HiresTexture>(
|
|
||||||
has_arbitrary_mipmaps,
|
|
||||||
system.GetCustomAssetLoader().LoadGameTexture(filename, s_file_library));
|
|
||||||
s_hires_texture_cache.try_emplace(filename, std::move(hires_texture));
|
|
||||||
}
|
|
||||||
const auto [it, inserted] =
|
const auto [it, inserted] =
|
||||||
s_hires_texture_id_to_arbmipmap.try_emplace(filename, has_arbitrary_mipmaps);
|
s_hires_texture_id_to_arbmipmap.try_emplace(filename, has_arbitrary_mipmaps);
|
||||||
if (!inserted)
|
if (!inserted)
|
||||||
{
|
{
|
||||||
failed_insert = true;
|
failed_insert = true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Since this is just a texture (single file) the mapper doesn't really matter
|
||||||
|
// just provide a string
|
||||||
|
s_file_library->SetAssetIDMapData(
|
||||||
|
filename, std::map<std::string, std::filesystem::path>{{"", path}});
|
||||||
|
|
||||||
|
if (g_ActiveConfig.bCacheHiresTextures)
|
||||||
|
{
|
||||||
|
auto hires_texture = std::make_shared<HiresTexture>(
|
||||||
|
has_arbitrary_mipmaps,
|
||||||
|
system.GetCustomAssetLoader().LoadGameTexture(filename, s_file_library));
|
||||||
|
s_hires_texture_cache.try_emplace(filename, std::move(hires_texture));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue