summaryrefslogtreecommitdiff
path: root/osd.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2015-01-15 11:33:58 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2015-01-15 11:33:58 +0100
commit66c65beea7ac5c6dbc416b89b3a5800d31a0ecd7 (patch)
treefb0cc3da4effd5b327e51019e0122fe2940a5ef6 /osd.c
parentbe9a6de0ef0bb282842f57a86d00075539f4156c (diff)
downloadvdr-66c65beea7ac5c6dbc416b89b3a5800d31a0ecd7.tar.gz
vdr-66c65beea7ac5c6dbc416b89b3a5800d31a0ecd7.tar.bz2
Added cOsdProvider::OsdSizeChanged()
Diffstat (limited to 'osd.c')
-rw-r--r--osd.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/osd.c b/osd.c
index 0532c0a8..d31ee8a3 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 3.3 2015/01/04 15:46:39 kls Exp $
+ * $Id: osd.c 3.4 2015/01/15 11:20:56 kls Exp $
*/
#include "osd.h"
@@ -1978,6 +1978,7 @@ int cOsdProvider::oldWidth = 0;
int cOsdProvider::oldHeight = 0;
double cOsdProvider::oldAspect = 1.0;
cImage *cOsdProvider::images[MAXOSDIMAGES] = { NULL };
+int cOsdProvider::osdState = 0;
cOsdProvider::cOsdProvider(void)
{
@@ -2015,6 +2016,7 @@ void cOsdProvider::UpdateOsdSize(bool Force)
int Width;
int Height;
double Aspect;
+ cMutexLock MutexLock(&cOsd::mutex);
cDevice::PrimaryDevice()->GetOsdSize(Width, Height, Aspect);
if (Width != oldWidth || Height != oldHeight || !DoubleEqual(Aspect, oldAspect) || Force) {
Setup.OSDLeft = int(round(Width * Setup.OSDLeftP));
@@ -2032,9 +2034,18 @@ void cOsdProvider::UpdateOsdSize(bool Force)
oldHeight = Height;
oldAspect = Aspect;
dsyslog("OSD size changed to %dx%d @ %g", Width, Height, Aspect);
+ osdState++;
}
}
+bool cOsdProvider::OsdSizeChanged(int &State)
+{
+ cMutexLock MutexLock(&cOsd::mutex);
+ bool Result = osdState != State;
+ State = osdState;
+ return Result;
+}
+
bool cOsdProvider::SupportsTrueColor(void)
{
if (osdProvider) {