1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Made cOsd::isOpen an integer counter to avoid problems with messages when a cOsdObject uses the raw OSD

This commit is contained in:
Klaus Schmidinger 2005-05-14 11:22:56 +02:00
parent e096b86ef6
commit 3688b801c7
4 changed files with 10 additions and 7 deletions

View File

@ -1064,6 +1064,7 @@ Andreas Regel <andreas.regel@gmx.de>
for pointing out a missing call to cStatus::MsgOsdtatusMessage(NULL) in for pointing out a missing call to cStatus::MsgOsdtatusMessage(NULL) in
cSkins::Message() cSkins::Message()
for reporting a problem in handling Transfer Mode for radio channels 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 <Thomas.Bergwinkl@t-online.de> Thomas Bergwinkl <Thomas.Bergwinkl@t-online.de>
for fixing the validity check for channel IDs, because some providers use TIDs for fixing the validity check for channel IDs, because some providers use TIDs

View File

@ -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 the EPG scan didn't work on systems that don't use DiSEqC (thanks to Michael
Reinelt for reporting this one). Reinelt for reporting this one).
- Made the Makefile patch friendlier (thanks to Ludwig Nussel). - 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).

8
osd.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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" #include "osd.h"
@ -574,7 +574,7 @@ const tIndex *cBitmap::Data(int x, int y)
// --- cOsd ------------------------------------------------------------------ // --- cOsd ------------------------------------------------------------------
bool cOsd::isOpen = false; int cOsd::isOpen = 0;
cOsd::cOsd(int Left, int Top) cOsd::cOsd(int Left, int Top)
{ {
@ -585,7 +585,7 @@ cOsd::cOsd(int Left, int Top)
left = Left; left = Left;
top = Top; top = Top;
width = height = 0; width = height = 0;
isOpen = true; isOpen++;
} }
cOsd::~cOsd() cOsd::~cOsd()
@ -593,7 +593,7 @@ cOsd::~cOsd()
for (int i = 0; i < numBitmaps; i++) for (int i = 0; i < numBitmaps; i++)
delete bitmaps[i]; delete bitmaps[i];
delete savedRegion; delete savedRegion;
isOpen = false; isOpen--;
} }
cBitmap *cOsd::GetBitmap(int Area) cBitmap *cOsd::GetBitmap(int Area)

6
osd.h
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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 #ifndef __OSD_H
@ -210,7 +210,7 @@ struct tArea {
class cOsd { class cOsd {
friend class cOsdProvider; friend class cOsdProvider;
private: private:
static bool isOpen; static int isOpen;
cBitmap *savedRegion; cBitmap *savedRegion;
cBitmap *bitmaps[MAXOSDAREAS]; cBitmap *bitmaps[MAXOSDAREAS];
int numBitmaps; int numBitmaps;
@ -235,7 +235,7 @@ protected:
public: public:
virtual ~cOsd(); virtual ~cOsd();
///< Shuts down the OSD. ///< Shuts down the OSD.
static bool IsOpen(void) { return isOpen; } static int IsOpen(void) { return isOpen; }
int Left(void) { return left; } int Left(void) { return left; }
int Top(void) { return top; } int Top(void) { return top; }
int Width(void) { return width; } int Width(void) { return width; }