mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 07:45:33 +01:00
Merge pull request #3700 from degasus/custom_textures
CustomTextures: Fix loading of the last mipmaps.
This commit is contained in:
commit
95e7c247df
@ -417,13 +417,17 @@ std::unique_ptr<HiresTexture> HiresTexture::Load(const std::string& base_filenam
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// calculate the size of the next mipmap
|
|
||||||
width >>= 1;
|
|
||||||
height >>= 1;
|
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
ret = std::unique_ptr<HiresTexture>(new HiresTexture);
|
ret = std::unique_ptr<HiresTexture>(new HiresTexture);
|
||||||
ret->m_levels.push_back(std::move(l));
|
ret->m_levels.push_back(std::move(l));
|
||||||
|
|
||||||
|
// no more mipmaps available
|
||||||
|
if (width == 1 && height == 1)
|
||||||
|
break;
|
||||||
|
|
||||||
|
// calculate the size of the next mipmap
|
||||||
|
width = std::max(1u, width >> 1);
|
||||||
|
height = std::max(1u, height >> 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user