mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 23:15:38 +00:00
Fixed an issue where font textures were sometimes updated with empty glyhps
This commit is contained in:
parent
6995196435
commit
8fe027e9ad
|
@ -768,8 +768,10 @@ Font::Glyph* Font::getGlyph(const unsigned int id)
|
||||||
glyph.rows = glyphSize.y;
|
glyph.rows = glyphSize.y;
|
||||||
|
|
||||||
// Upload glyph bitmap to texture.
|
// Upload glyph bitmap to texture.
|
||||||
|
if (glyphSize.x > 0 && glyphSize.y > 0) {
|
||||||
mRenderer->updateTexture(tex->textureId, 0, Renderer::TextureType::RED, cursor.x, cursor.y,
|
mRenderer->updateTexture(tex->textureId, 0, Renderer::TextureType::RED, cursor.x, cursor.y,
|
||||||
glyphSize.x, glyphSize.y, glyphSlot->bitmap.buffer);
|
glyphSize.x, glyphSize.y, glyphSlot->bitmap.buffer);
|
||||||
|
}
|
||||||
|
|
||||||
return &glyph;
|
return &glyph;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue