diff options
author | anbr <vdr07@deltab.de> | 2009-09-29 20:24:09 +0200 |
---|---|---|
committer | anbr <vdr07@deltab.de> | 2009-09-29 20:24:09 +0200 |
commit | 3c26d247ecdba709cfa3cf22a53b4626ee0b88e0 (patch) | |
tree | 8a5daa4d65fe43a0f2805af5f8cd165de54bfee8 /imon.c | |
parent | 877e98b09edd13fabe51c39fa984e1f04ad7b8ba (diff) | |
download | vdr-plugin-imonlcd-3c26d247ecdba709cfa3cf22a53b4626ee0b88e0.tar.gz vdr-plugin-imonlcd-3c26d247ecdba709cfa3cf22a53b4626ee0b88e0.tar.bz2 |
Add mode to show information on two lines provided by Sven (cokker) (Feature #161)
Diffstat (limited to 'imon.c')
-rw-r--r-- | imon.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -132,7 +132,7 @@ ciMonLCD::~ciMonLCD() { */ int ciMonLCD::open(const char* szDevice, eProtocol pro) { - if(!SetFont(theSetup.m_szFont)) { + if(!SetFont(theSetup.m_szFont,theSetup.m_bTwoLineMode)) { return -1; } @@ -636,13 +636,19 @@ int ciMonLCD::lengthToPixels(int length) return (pixLen[32 + length] ^ 0xffffffff); } -bool ciMonLCD::SetFont(const char *szFont) { +bool ciMonLCD::SetFont(const char *szFont, int bTwoLineMode) { ciMonFont* tmpFont = NULL; cString sFileName = cFont::GetFontFileName(szFont); - if(!isempty(sFileName)) { - tmpFont = new ciMonFont(sFileName,12,11); + if(!isempty(sFileName)) + { + if (bTwoLineMode) + { + tmpFont = new ciMonFont(sFileName,6,8); + } else { + tmpFont = new ciMonFont(sFileName,12,11); + } } else { esyslog("iMonLCD: unable to find file for font '%s'",szFont); } |