From 695a6495ddcfa9838b5c921a9ada97e7c34c7eb8 Mon Sep 17 00:00:00 2001 From: jojo61 Date: Sun, 17 Nov 2019 11:07:15 +0100 Subject: [PATCH] Small Fix for Fonts --- openglosd.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/openglosd.cpp b/openglosd.cpp index 24a993b..a47cd7d 100644 --- a/openglosd.cpp +++ b/openglosd.cpp @@ -439,9 +439,12 @@ cOglFont *cOglFont::Get(const char *name, int charHeight) { } void cOglFont::Init(void) { - fonts = new cList; - if (FT_Init_FreeType(&ftLib)) + + if (FT_Init_FreeType(&ftLib)) { esyslog("[softhddev]failed to initialize FreeType library!"); + return; + } + fonts = new cList; initiated = true; } @@ -900,10 +903,10 @@ bool cOglCmdCopyBufferToOutputFb::Execute(void) { glPixelStorei(GL_PACK_ALIGNMENT, 1); if (posd) glReadPixels(0, 0 ,fb->Width(), fb->Height(),GL_RGBA,GL_UNSIGNED_BYTE,posd); - glFlush(); - oFb->Unbind(); + glFlush(); + oFb->Unbind(); pthread_mutex_unlock(&OSDMutex); - ActivateOsd(oFb->texture,x, y, fb->Width() ,fb->Height()); + ActivateOsd(oFb->texture,x, y, fb->Width() ,fb->Height()); return true; }