diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2000-10-03 18:00:00 +0200 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2000-10-03 18:00:00 +0200 |
commit | ef8fe3f04c30caedeb17b11ac275581539f039c7 (patch) | |
tree | 40a00f075c4fc94b95fd070077e89a1916923789 /interface.c | |
parent | 7e4b4d290570aee1d24241b0e0ac10e7c8148a36 (diff) | |
download | vdr-patch-lnbsharing-ef8fe3f04c30caedeb17b11ac275581539f039c7.tar.gz vdr-patch-lnbsharing-ef8fe3f04c30caedeb17b11ac275581539f039c7.tar.bz2 |
Version 0.65vdr-0.65
- Modified LIRC interface to better handle repeat function.
- Faster OSD by first writing into a bitmap and then sending the entire bitmap
to the DVB driver at once (requires the patch 'dvb.c.071.diff' to be applied
against the version 0.71 DVB driver file 'dvb.c').
- When switching channels the channel is now immediately displayed, and the
current/next information is shown as soon as it becomes available.
- No longer displaying the year in the 'Recordings' menu to saves space for the
title.
- The 'Recordings' menu now displays a '*' to indicate new recordings.
- Added the description of the timers.conf file to the FORMATS file (thanks to
Bastian Guse).
- Displaying as much as possible of the current/next info (dropping characters
that would display only partially).
- In normal viewing mode the '0' key now toggles between the current and the
previous channel.
Diffstat (limited to 'interface.c')
-rw-r--r-- | interface.c | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/interface.c b/interface.c index 3d01238..a0fca0e 100644 --- a/interface.c +++ b/interface.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: interface.c 1.19 2000/09/19 17:41:23 kls Exp $ + * $Id: interface.c 1.21 2000/10/03 13:28:02 kls Exp $ */ #include "interface.h" @@ -69,6 +69,8 @@ unsigned int cInterface::GetCh(bool Wait) eKeys cInterface::GetKey(bool Wait) { + if (open) + cDvbApi::PrimaryDvbApi->Flush(); if (SVDRP) SVDRP->Process(); eKeys Key = keyFromWait != kNone ? keyFromWait : Keys.Get(GetCh(Wait)); @@ -84,6 +86,8 @@ void cInterface::PutKey(eKeys Key) eKeys cInterface::Wait(int Seconds, bool KeepChar) { eKeys Key = kNone; + if (open) + cDvbApi::PrimaryDvbApi->Flush(); RcIo.Flush(500); if (cFile::AnyFileReady(-1, Seconds * 1000)) Key = GetKey(); @@ -326,15 +330,8 @@ eKeys cInterface::DisplayChannel(int Number, const char *Name, bool WithInfo) if (Number) RcIo.Number(Number); if (Name && !Recording()) { - char *RunningTitle = "", *RunningSubtitle = "", *NextTitle = "", *NextSubtitle = ""; - int Lines = 0; - if (Number && WithInfo && EIT.IsValid()) { - if (*(RunningTitle = EIT.GetRunningTitle())) Lines++; - if (*(RunningSubtitle = EIT.GetRunningSubtitle())) Lines++; - if (*(NextTitle = EIT.GetNextTitle())) Lines++; - if (*(NextSubtitle = EIT.GetNextSubtitle())) Lines++; - } - Open(MenuColumns, Lines + 1); + Open(MenuColumns, 5); + cDvbApi::PrimaryDvbApi->Fill(0, 0, MenuColumns, 1, clrBackground); int BufSize = MenuColumns + 1; char buffer[BufSize]; if (Number) @@ -346,27 +343,38 @@ eKeys cInterface::DisplayChannel(int Number, const char *Name, bool WithInfo) struct tm *now = localtime(&t); snprintf(buffer, BufSize, "%02d:%02d", now->tm_hour, now->tm_min); Write(-5, 0, buffer); + cDvbApi::PrimaryDvbApi->Flush(); + + char *RunningTitle = "", *RunningSubtitle = "", *NextTitle = "", *NextSubtitle = ""; + int Lines = 0; + if (Number && WithInfo && EIT.IsValid()) { + if (*(RunningTitle = EIT.GetRunningTitle())) Lines++; + if (*(RunningSubtitle = EIT.GetRunningSubtitle())) Lines++; + if (*(NextTitle = EIT.GetNextTitle())) Lines++; + if (*(NextSubtitle = EIT.GetNextSubtitle())) Lines++; + } if (Lines > 0) { const int t = 6; - int w = MenuColumns - t; int l = 1; + cDvbApi::PrimaryDvbApi->Fill(0, 1, MenuColumns, Lines, clrBackground); if (*RunningTitle) { Write(0, l, EIT.GetRunningTime(), clrYellow, clrBackground); - snprintf(buffer, BufSize, "%.*s", w, RunningTitle); Write(t, l, buffer, clrCyan, clrBackground); + Write(t, l, RunningTitle, clrCyan, clrBackground); l++; } if (*RunningSubtitle) { - snprintf(buffer, BufSize, "%.*s", w, RunningSubtitle); Write(t, l, buffer, clrCyan, clrBackground); + Write(t, l, RunningSubtitle, clrCyan, clrBackground); l++; } if (*NextTitle) { Write(0, l, EIT.GetNextTime(), clrYellow, clrBackground); - snprintf(buffer, BufSize, "%.*s", w, NextTitle); Write(t, l, buffer, clrCyan, clrBackground); + Write(t, l, NextTitle, clrCyan, clrBackground); l++; } if (*NextSubtitle) { - snprintf(buffer, BufSize, "%.*s", w, NextSubtitle); Write(t, l, buffer, clrCyan, clrBackground); + Write(t, l, NextSubtitle, clrCyan, clrBackground); } + cDvbApi::PrimaryDvbApi->Flush(); } eKeys Key = Wait(5, true); if (Key == kOk) |