[client] egl: added FPS rendering

This commit is contained in:
Geoffrey McRae
2018-11-20 09:50:09 +11:00
parent 5b453d604e
commit ab98c87e7c
6 changed files with 165 additions and 17 deletions

View File

@@ -116,7 +116,7 @@ static LG_FontBitmap * lgf_sdl_render(LG_FontObj opaque, unsigned int fg_color,
if (!(surface = TTF_RenderText_Blended(this->font, text, color)))
{
DEBUG_ERROR("Failed to render text: %s", TTF_GetError());
return false;
return NULL;
}
LG_FontBitmap * out = malloc(sizeof(LG_FontBitmap));
@@ -124,7 +124,7 @@ static LG_FontBitmap * lgf_sdl_render(LG_FontObj opaque, unsigned int fg_color,
{
SDL_FreeSurface(surface);
DEBUG_ERROR("Failed to allocate memory for font bitmap");
return false;
return NULL;
}
out->reserved = surface;