summaryrefslogtreecommitdiff
path: root/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/interface.c b/interface.c
index 55cdb0b..03dca06 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.35 2001/02/18 10:46:13 kls Exp $
+ * $Id: interface.c 1.39 2001/07/28 14:57:52 kls Exp $
*/
#include "interface.h"
@@ -44,8 +44,13 @@ cInterface::~cInterface()
void cInterface::Open(int NumCols, int NumLines)
{
- if (!open++)
+ if (!open++) {
+ if (NumCols == 0)
+ NumCols = Setup.OSDwidth;
+ if (NumLines == 0)
+ NumLines = Setup.OSDheight;
cDvbApi::PrimaryDvbApi->Open(width = NumCols, height = NumLines);
+ }
}
void cInterface::Close(void)
@@ -281,16 +286,17 @@ void cInterface::Title(const char *s)
void cInterface::Status(const char *s, eDvbColor FgColor, eDvbColor BgColor)
{
- ClearEol(0, -3, s ? BgColor : clrBackground);
+ int Line = (abs(height) == 1) ? 0 : -2;
+ ClearEol(0, Line, s ? BgColor : clrBackground);
if (s)
- Write(0, -3, s, FgColor, BgColor);
+ Write(0, Line, s, FgColor, BgColor);
}
void cInterface::Info(const char *s)
{
- Open();
+ Open(Setup.OSDwidth, -1);
isyslog(LOG_INFO, "info: %s", s);
- Status(s, clrWhite, clrGreen);
+ Status(s, clrBlack, clrGreen);
Wait();
Status(NULL);
Close();
@@ -298,7 +304,7 @@ void cInterface::Info(const char *s)
void cInterface::Error(const char *s)
{
- Open();
+ Open(Setup.OSDwidth, -1);
esyslog(LOG_ERR, "ERROR: %s", s);
Status(s, clrWhite, clrRed);
Wait();
@@ -310,7 +316,7 @@ bool cInterface::Confirm(const char *s)
{
Open();
isyslog(LOG_INFO, "confirm: %s", s);
- Status(s, clrBlack, clrGreen);
+ Status(s, clrBlack, clrYellow);
bool result = Wait(10) == kOk;
Status(NULL);
Close();