diff options
author | Johns <johns98@gmx.net> | 2014-02-12 14:37:35 +0100 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2014-02-12 14:37:35 +0100 |
commit | 3d3a88e76c14a2c89169b83f241cff4d34158776 (patch) | |
tree | ab982dbb1a3d850c0c281341c1a5b18b0ce9d6fb | |
parent | 450c9b6309aa87a2e0ebd0d93bdf34b35eb94bb2 (diff) | |
download | vdr-plugin-softhddevice-3d3a88e76c14a2c89169b83f241cff4d34158776.tar.gz vdr-plugin-softhddevice-3d3a88e76c14a2c89169b83f241cff4d34158776.tar.bz2 |
Fix OSD bugs.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | softhddevice.cpp | 54 |
2 files changed, 31 insertions, 24 deletions
@@ -1,6 +1,7 @@ User johns Date: + Fix OSD bugs. Add some VA-API VPP info outputs. Remove build files for old unstable VDR. diff --git a/softhddevice.cpp b/softhddevice.cpp index 126cd2d..f7b7a46 100644 --- a/softhddevice.cpp +++ b/softhddevice.cpp @@ -266,10 +266,12 @@ class cSoftOsd:public cOsd { public: static volatile char Dirty; ///< flag force redraw everything - int OsdLevel; ///< current osd level + int OsdLevel; ///< current osd level FIXME: remove cSoftOsd(int, int, uint); ///< osd constructor virtual ~ cSoftOsd(void); ///< osd destructor + /// set the sub-areas to the given areas + virtual eOsdError SetAreas(const tArea *, int); virtual void Flush(void); ///< commits all data to the hardware virtual void SetActive(bool); ///< sets OSD to be the active one }; @@ -295,11 +297,6 @@ void cSoftOsd::SetActive(bool on) } cOsd::SetActive(on); - // ignore sub-title if menu is open - if (OsdLevel >= OSD_LEVEL_SUBTITLES && IsOpen()) { - return; - } - if (on) { Dirty = 1; // only flush here if there are already bitmaps @@ -331,7 +328,6 @@ cSoftOsd::cSoftOsd(int left, int top, uint level) #endif OsdLevel = level; - SetActive(true); } /** @@ -363,6 +359,31 @@ cSoftOsd::~cSoftOsd(void) } /** ++* Set the sub-areas to the given areas +*/ +eOsdError cSoftOsd::SetAreas(const tArea * areas, int n) +{ +#ifdef OSD_DEBUG + dsyslog("[softhddev]%s: %d areas \n", __FUNCTION__, n); +#endif + + // clear old OSD, when new areas are set + if (!IsTrueColor()) { + cBitmap *bitmap; + int i; + + for (i = 0; (bitmap = GetBitmap(i)); i++) { + bitmap->Clean(); + } + } + if (Active()) { + VideoOsdClear(); + Dirty = 1; + } + return cOsd::SetAreas(areas, n); +} + +/** ** Actually commits all data to the OSD hardware. */ void cSoftOsd::Flush(void) @@ -377,10 +398,6 @@ void cSoftOsd::Flush(void) if (!Active()) { // this osd is not active return; } - // don't draw sub-title if menu is active - if (OsdLevel >= OSD_LEVEL_SUBTITLES && IsOpen()) { - return; - } #ifdef USE_YAEPG // support yaepghd, video window if (vidWin.bpp) { @@ -396,17 +413,6 @@ void cSoftOsd::Flush(void) } #endif - // - // VDR draws subtitle without clearing the old - // - if (OsdLevel >= OSD_LEVEL_SUBTITLES) { - VideoOsdClear(); - cSoftOsd::Dirty = 1; -#ifdef OSD_DEBUG - dsyslog("[softhddev]%s: subtitle clear\n", __FUNCTION__); -#endif - } - if (!IsTrueColor()) { cBitmap *bitmap; int i; @@ -483,7 +489,7 @@ void cSoftOsd::Flush(void) // FIXME: reuse argb free(argb); } - cSoftOsd::Dirty = 0; + Dirty = 0; return; } @@ -507,7 +513,7 @@ void cSoftOsd::Flush(void) delete pm; } - cSoftOsd::Dirty = 0; + Dirty = 0; } ////////////////////////////////////////////////////////////////////////////// |