summaryrefslogtreecommitdiff
path: root/dvbosd.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-04-13 11:38:57 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2002-04-13 11:38:57 +0200
commit7502d3e8ad3a453c314a4c8e57f9c0b979f79489 (patch)
tree7c7d801c59dfd6d28b283e309636c1777443c63c /dvbosd.c
parentcba5ef437391362f6588226e9f2192cc6fd8cee8 (diff)
downloadvdr-7502d3e8ad3a453c314a4c8e57f9c0b979f79489.tar.gz
vdr-7502d3e8ad3a453c314a4c8e57f9c0b979f79489.tar.bz2
Fixed color palette handling on 'big endian' systems
Diffstat (limited to 'dvbosd.c')
-rw-r--r--dvbosd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/dvbosd.c b/dvbosd.c
index c3484300..eb962613 100644
--- a/dvbosd.c
+++ b/dvbosd.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbosd.c 1.12 2002/01/13 16:25:18 kls Exp $
+ * $Id: dvbosd.c 1.13 2002/04/13 11:34:48 kls Exp $
*/
#include "dvbosd.h"
@@ -25,6 +25,9 @@ cPalette::cPalette(int Bpp)
int cPalette::Index(eDvbColor Color)
{
+#if __BYTE_ORDER == __BIG_ENDIAN
+ Color = eDvbColor(((Color & 0xFF) << 24) | ((Color & 0xFF00) << 8) | ((Color & 0xFF0000) >> 8) | ((Color & 0xFF000000) >> 24));
+#endif
for (int i = 0; i < numColors; i++) {
if (color[i] == Color) {
used[i] = true;