summaryrefslogtreecommitdiff
path: root/osd.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2015-09-10 14:18:38 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2015-09-10 14:18:38 +0200
commit4e46d2bb3bbcaa72bc106170d9a7dd0ec77ddd0d (patch)
treea3fe63667eafdbd8a956a8389f15fa8326e5854c /osd.c
parenta384d14f925877d240bbbe7705ba0bc678411b86 (diff)
downloadvdr-4e46d2bb3bbcaa72bc106170d9a7dd0ec77ddd0d.tar.gz
vdr-4e46d2bb3bbcaa72bc106170d9a7dd0ec77ddd0d.tar.bz2
The width and height of the OSD are now limited to the actual maximum dimensions of the output device
Diffstat (limited to 'osd.c')
-rw-r--r--osd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/osd.c b/osd.c
index 579c54db..524700ae 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 4.2 2015/03/25 08:57:05 kls Exp $
+ * $Id: osd.c 4.3 2015/09/10 14:12:06 kls Exp $
*/
#include "osd.h"
@@ -2042,8 +2042,8 @@ void cOsdProvider::UpdateOsdSize(bool Force)
if (Width != oldWidth || Height != oldHeight || !DoubleEqual(Aspect, oldAspect) || Force) {
Setup.OSDLeft = int(round(Width * Setup.OSDLeftP));
Setup.OSDTop = int(round(Height * Setup.OSDTopP));
- Setup.OSDWidth = int(round(Width * Setup.OSDWidthP)) & ~0x07; // OSD width must be a multiple of 8
- Setup.OSDHeight = int(round(Height * Setup.OSDHeightP));
+ Setup.OSDWidth = min(Width - Setup.OSDLeft, int(round(Width * Setup.OSDWidthP))) & ~0x07; // OSD width must be a multiple of 8
+ Setup.OSDHeight = min(Height - Setup.OSDTop, int(round(Height * Setup.OSDHeightP)));
Setup.OSDAspect = Aspect;
Setup.FontOsdSize = int(round(Height * Setup.FontOsdSizeP));
Setup.FontFixSize = int(round(Height * Setup.FontFixSizeP));