summaryrefslogtreecommitdiff
path: root/imon.c
diff options
context:
space:
mode:
authoranbr <vdr07@deltab.de>2009-09-29 20:24:09 +0200
committeranbr <vdr07@deltab.de>2009-09-29 20:24:09 +0200
commit3c26d247ecdba709cfa3cf22a53b4626ee0b88e0 (patch)
tree8a5daa4d65fe43a0f2805af5f8cd165de54bfee8 /imon.c
parent877e98b09edd13fabe51c39fa984e1f04ad7b8ba (diff)
downloadvdr-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.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/imon.c b/imon.c
index 958d809..b455eba 100644
--- a/imon.c
+++ b/imon.c
@@ -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);
}