From 3688b801c728934db95dc2f2d2738696f248c919 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 14 May 2005 11:22:56 +0200 Subject: [PATCH] Made cOsd::isOpen an integer counter to avoid problems with messages when a cOsdObject uses the raw OSD --- CONTRIBUTORS | 1 + HISTORY | 2 ++ osd.c | 8 ++++---- osd.h | 6 +++--- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index f286fbe6..39d70776 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1064,6 +1064,7 @@ Andreas Regel for pointing out a missing call to cStatus::MsgOsdtatusMessage(NULL) in cSkins::Message() for reporting a problem in handling Transfer Mode for radio channels + for reporting a problem with messages when a cOsdObject uses the raw OSD Thomas Bergwinkl for fixing the validity check for channel IDs, because some providers use TIDs diff --git a/HISTORY b/HISTORY index 9a63c75b..17df98b1 100644 --- a/HISTORY +++ b/HISTORY @@ -3523,3 +3523,5 @@ Video Disk Recorder Revision History the EPG scan didn't work on systems that don't use DiSEqC (thanks to Michael Reinelt for reporting this one). - Made the Makefile patch friendlier (thanks to Ludwig Nussel). +- Made cOsd::isOpen an integer counter to avoid problems with messages when a + cOsdObject uses the raw OSD (thanks to Andreas Regel for reporting this one). diff --git a/osd.c b/osd.c index 8b10f74f..b0d3eeaa 100644 --- a/osd.c +++ b/osd.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osd.c 1.59 2004/12/19 12:27:38 kls Exp $ + * $Id: osd.c 1.60 2005/05/14 11:16:30 kls Exp $ */ #include "osd.h" @@ -574,7 +574,7 @@ const tIndex *cBitmap::Data(int x, int y) // --- cOsd ------------------------------------------------------------------ -bool cOsd::isOpen = false; +int cOsd::isOpen = 0; cOsd::cOsd(int Left, int Top) { @@ -585,7 +585,7 @@ cOsd::cOsd(int Left, int Top) left = Left; top = Top; width = height = 0; - isOpen = true; + isOpen++; } cOsd::~cOsd() @@ -593,7 +593,7 @@ cOsd::~cOsd() for (int i = 0; i < numBitmaps; i++) delete bitmaps[i]; delete savedRegion; - isOpen = false; + isOpen--; } cBitmap *cOsd::GetBitmap(int Area) diff --git a/osd.h b/osd.h index bd69084f..2f5de4d0 100644 --- a/osd.h +++ b/osd.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osd.h 1.47 2004/10/16 10:33:44 kls Exp $ + * $Id: osd.h 1.48 2005/05/14 11:15:55 kls Exp $ */ #ifndef __OSD_H @@ -210,7 +210,7 @@ struct tArea { class cOsd { friend class cOsdProvider; private: - static bool isOpen; + static int isOpen; cBitmap *savedRegion; cBitmap *bitmaps[MAXOSDAREAS]; int numBitmaps; @@ -235,7 +235,7 @@ protected: public: virtual ~cOsd(); ///< Shuts down the OSD. - static bool IsOpen(void) { return isOpen; } + static int IsOpen(void) { return isOpen; } int Left(void) { return left; } int Top(void) { return top; } int Width(void) { return width; }