mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 15:15:37 +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;
|
||||
|
||||
// Upload glyph bitmap to texture.
|
||||
mRenderer->updateTexture(tex->textureId, 0, Renderer::TextureType::RED, cursor.x, cursor.y,
|
||||
glyphSize.x, glyphSize.y, glyphSlot->bitmap.buffer);
|
||||
if (glyphSize.x > 0 && glyphSize.y > 0) {
|
||||
mRenderer->updateTexture(tex->textureId, 0, Renderer::TextureType::RED, cursor.x, cursor.y,
|
||||
glyphSize.x, glyphSize.y, glyphSlot->bitmap.buffer);
|
||||
}
|
||||
|
||||
return &glyph;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue