From 2f528db30a14ce1e1d2cb6d472bbacff1ed7ef4a Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Fri, 20 Jul 2007 14:57:37 +0200 Subject: Fixed a typo in the function name of cOsd::SetOsdPosition() and added a range check to it --- CONTRIBUTORS | 2 ++ HISTORY | 2 ++ config.h | 6 +++--- osd.c | 8 ++++---- osd.h | 4 ++-- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index effd2968..07c0add6 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1958,6 +1958,8 @@ Christoph Haubrich calling "vdr --help" for fixing cDevice::ToggleMute() for suggestions that led to implementing cOsd::SetOsdPosition() etc. + for fixing a typo in the function name of cOsd::SetOsdPosition() and adding a range + check to it Pekka Mauno for fixing cSchedule::GetFollowingEvent() in case there is currently no present diff --git a/HISTORY b/HISTORY index 29590288..8454d013 100644 --- a/HISTORY +++ b/HISTORY @@ -5285,3 +5285,5 @@ Video Disk Recorder Revision History Richter). - Improved numdigits(), isnumber() and strreplace() (thanks to Tobias Bratfisch). - Fixed clearing color buttons in the 'curses' skin (thanks to Udo Richter). +- Fixed a typo in the function name of cOsd::SetOsdPosition() and added a range + check to it (thanks to Christoph Haubrich). diff --git a/config.h b/config.h index 5229d731..edc51235 100644 --- a/config.h +++ b/config.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 1.293 2007/07/20 12:31:38 kls Exp $ + * $Id: config.h 1.294 2007/07/20 14:52:05 kls Exp $ */ #ifndef __CONFIG_H @@ -27,8 +27,8 @@ // The plugin API's version number: -#define APIVERSION "1.5.5" -#define APIVERSNUM 10505 // Version * 10000 + Major * 100 + Minor +#define APIVERSION "1.5.6" +#define APIVERSNUM 10506 // Version * 10000 + Major * 100 + Minor // When loading plugins, VDR searches them by their APIVERSION, which // may be smaller than VDRVERSION in case there have been no changes to diff --git a/osd.c b/osd.c index bfc69d64..ec7f9a3c 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.70 2007/06/17 13:54:34 kls Exp $ + * $Id: osd.c 1.71 2007/07/20 14:51:36 kls Exp $ */ #include "osd.h" @@ -668,12 +668,12 @@ cOsd::~cOsd() isOpen--; } -void cOsd::SetOsdPostion(int Left, int Top, int Width, int Height) +void cOsd::SetOsdPosition(int Left, int Top, int Width, int Height) { osdLeft = Left; osdTop = Top; - osdWidth = Width; - osdHeight = Height; + osdWidth = min(max(Width, MINOSDWIDTH), MAXOSDWIDTH); + osdHeight = min(max(Height, MINOSDHEIGHT), MAXOSDHEIGHT); } void cOsd::SetAntiAliasGranularity(uint FixedColors, uint BlendColors) diff --git a/osd.h b/osd.h index 07530582..08bc4184 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.55 2007/06/17 13:59:22 kls Exp $ + * $Id: osd.h 1.56 2007/07/20 14:50:17 kls Exp $ */ #ifndef __OSD_H @@ -276,7 +276,7 @@ public: static int OsdTop(void) { return osdTop ? osdTop : Setup.OSDTop; } static int OsdWidth(void) { return osdWidth ? osdWidth : Setup.OSDWidth; } static int OsdHeight(void) { return osdHeight ? osdHeight : Setup.OSDHeight; } - static void SetOsdPostion(int Left, int Top, int Width, int Height); + static void SetOsdPosition(int Left, int Top, int Width, int Height); ///< Sets the position and size of the OSD to the given values. ///< This may be useful for plugins that determine the scaling of the ///< video image and need to scale the OSD accordingly to fit on the -- cgit v1.2.3