diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2000-10-03 10:34:48 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2000-10-03 10:34:48 +0200 |
commit | 6a50f37f25b43112d4a1fad8a5057089548dfc3c (patch) | |
tree | c3a28722d1c7b04c12174fe748aead391e7c0ed8 /interface.c | |
parent | b4faf3787a24c43b0a22b3ee695374012c992eb2 (diff) | |
download | vdr-6a50f37f25b43112d4a1fad8a5057089548dfc3c.tar.gz vdr-6a50f37f25b43112d4a1fad8a5057089548dfc3c.tar.bz2 |
Faster OSD by using bitmap
Diffstat (limited to 'interface.c')
-rw-r--r-- | interface.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/interface.c b/interface.c index 3d01238b..5758d358 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.20 2000/10/02 16:23:53 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,10 +343,21 @@ 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); @@ -367,6 +375,7 @@ eKeys cInterface::DisplayChannel(int Number, const char *Name, bool WithInfo) if (*NextSubtitle) { snprintf(buffer, BufSize, "%.*s", w, NextSubtitle); Write(t, l, buffer, clrCyan, clrBackground); } + cDvbApi::PrimaryDvbApi->Flush(); } eKeys Key = Wait(5, true); if (Key == kOk) |