mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07: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;
|
||||
}
|
||||
|
||||
// calculate the size of the next mipmap
|
||||
width >>= 1;
|
||||
height >>= 1;
|
||||
|
||||
if (!ret)
|
||||
ret = std::unique_ptr<HiresTexture>(new HiresTexture);
|
||||
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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user