diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2000-11-18 15:46:00 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2000-11-18 15:46:00 +0100 |
commit | ca42f7c8f144b2e342b9df821e3b841c7766bd05 (patch) | |
tree | 36a570851c57dc6c7ea9a91e3ea8793184ee9e32 /dvbosd.c | |
parent | 3e04208de3c7f29e69ff264b557c04074bb9b21c (diff) | |
download | vdr-ca42f7c8f144b2e342b9df821e3b841c7766bd05.tar.gz vdr-ca42f7c8f144b2e342b9df821e3b841c7766bd05.tar.bz2 |
Fixed font for system commands
Diffstat (limited to 'dvbosd.c')
-rw-r--r-- | dvbosd.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbosd.c 1.5 2000/11/05 12:53:09 kls Exp $ + * $Id: dvbosd.c 1.6 2000/11/18 15:36:51 kls Exp $ */ #include "dvbosd.h" @@ -21,6 +21,7 @@ cBitmap::cBitmap(int Width, int Height) width = Width; height = Height; bitmap = NULL; + fontType = fontOsd; font = NULL; if (width > 0 && height > 0) { bitmap = new char[width * height]; @@ -42,10 +43,15 @@ cBitmap::~cBitmap() delete bitmap; } -void cBitmap::SetFont(eDvbFont Font) +eDvbFont cBitmap::SetFont(eDvbFont Font) { - delete font; - font = new cFont(Font); + eDvbFont oldFont = fontType; + if (fontType != Font || !font) { + delete font; + font = new cFont(Font); + fontType = Font; + } + return oldFont; } bool cBitmap::Dirty(void) |