Minor fixes
This commit is contained in:
@@ -180,7 +180,7 @@ namespace Nz
|
||||
const std::shared_ptr<Font>& defaultFont = Font::GetDefault();
|
||||
defaultFont->SetAtlas(nullptr);
|
||||
|
||||
if (!defaultAtlas.use_count() > 1)
|
||||
if (defaultAtlas.use_count() >= 1)
|
||||
{
|
||||
// Still not the only one to own it ? Then crap.
|
||||
NazaraWarning("Default font atlas uses hardware storage and is still used");
|
||||
|
||||
@@ -49,11 +49,15 @@ namespace Nz
|
||||
else
|
||||
{
|
||||
// At least one font is using this atlas, remove our glyphes
|
||||
for (auto&& [_, glyphMap] : m_glyphes)
|
||||
for (auto&& [glyphKey, glyphMap] : m_glyphes)
|
||||
{
|
||||
for (auto&& [_, glyph] : glyphMap)
|
||||
NazaraUnused(glyphKey);
|
||||
for (auto&& [character, glyph] : glyphMap)
|
||||
{
|
||||
NazaraUnused(character);
|
||||
m_atlas->Free(&glyph.atlasRect, &glyph.layerIndex, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Free all cached glyphes
|
||||
m_glyphes.clear();
|
||||
|
||||
Reference in New Issue
Block a user