summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-07-18 09:28:38 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2004-07-18 09:28:38 +0200
commit35724f07bd27020882b59cbc3e5c157d52b9cfda (patch)
tree25ad681b330cc31fbc2e51818c039223339b95a1
parentd32f0008618b36d8db92e558b9f8413d0c812222 (diff)
downloadvdr-35724f07bd27020882b59cbc3e5c157d52b9cfda.tar.gz
vdr-35724f07bd27020882b59cbc3e5c157d52b9cfda.tar.bz2
Making sure the OSD reports oeWrongAlignment errors before any oeAreasOverlap error
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY2
-rw-r--r--osd.c11
3 files changed, 11 insertions, 4 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 2c4a4d91..0b82353a 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -860,6 +860,8 @@ Reinhard Nissl <rnissl@gmx.de>
for adding cDevice::Flush() to make sure that all data in the video card's buffers
has been processed
for reporting a bug in checking the last area for misalignment in cOsd::CanHandleAreas()
+ for suggesting to make sure the OSD reports oeWrongAlignment errors before any
+ oeAreasOverlap error
Richard Robson <richard_robson@beeb.net>
for reporting freezing replay if a timer starts while in Transfer Mode from the
diff --git a/HISTORY b/HISTORY
index 4c6d2a07..c60b6a8e 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2952,3 +2952,5 @@ Video Disk Recorder Revision History
- Fixed handling error case '-1' when polling section filters (thanks to Marco
Schlüßler).
- Fixed handling error case '-1' when polling CAM connections.
+- Making sure the OSD reports oeWrongAlignment errors before any oeAreasOverlap
+ error (suggested by Reinhard Nissl).
diff --git a/osd.c b/osd.c
index c7ec8b89..2877c280 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.56 2004/07/17 13:39:30 kls Exp $
+ * $Id: osd.c 1.57 2004/07/18 09:23:03 kls Exp $
*/
#include "osd.h"
@@ -602,15 +602,18 @@ cBitmap *cOsd::GetBitmap(int Area)
eOsdError cOsd::CanHandleAreas(const tArea *Areas, int NumAreas)
{
+ eOsdError Result = oeOk;
for (int i = 0; i < NumAreas; i++) {
if (Areas[i].x1 > Areas[i].x2 || Areas[i].y1 > Areas[i].y2 || Areas[i].x1 < 0 || Areas[i].y1 < 0)
return oeWrongAlignment;
for (int j = i + 1; j < NumAreas; j++) {
- if (Areas[i].Intersects(Areas[j]))
- return oeAreasOverlap;
+ if (Areas[i].Intersects(Areas[j])) {
+ Result = oeAreasOverlap;
+ break;
+ }
}
}
- return oeOk;
+ return Result;
}
eOsdError cOsd::SetAreas(const tArea *Areas, int NumAreas)