1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed color palette handling on 'big endian' systems

This commit is contained in:
Klaus Schmidinger 2002-04-13 11:38:57 +02:00
parent cba5ef4373
commit 7502d3e8ad
3 changed files with 10 additions and 2 deletions

View File

@ -285,3 +285,6 @@ Gerald Raaf <graaf@attglobal.net>
Andreas Roedl <flood@flood-net.de> Andreas Roedl <flood@flood-net.de>
for adding some DVB-T channels for Berlin (Germany) to channels.conf.terr for adding some DVB-T channels for Berlin (Germany) to channels.conf.terr
Jean Martin <mac_j_fr@hotmail.com>
for pointing out a problem with OSD color palette handling on "big endian" systems

View File

@ -1191,9 +1191,11 @@ Video Disk Recorder Revision History
same name was manually deleted on a system with more than one video directory same name was manually deleted on a system with more than one video directory
(thanks to Dirk Wiebel for reporting this one). (thanks to Dirk Wiebel for reporting this one).
2002-04-12: Version 1.0.1 2002-04-13: Version 1.0.1
- Added some DVB-T channels for Berlin (Germany) to channels.conf.terr (thanks to - Added some DVB-T channels for Berlin (Germany) to channels.conf.terr (thanks to
Andreas Roedl). Andreas Roedl).
- Implemented enhanced string editing with upper-/lowercase, insert/overwrite - Implemented enhanced string editing with upper-/lowercase, insert/overwrite
and delete (thanks to Sergei Haller). and delete (thanks to Sergei Haller).
- Fixed color palette handling on "big endian" systems (thanks to Jean Martin
for pointing out this one).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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" #include "dvbosd.h"
@ -25,6 +25,9 @@ cPalette::cPalette(int Bpp)
int cPalette::Index(eDvbColor Color) 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++) { for (int i = 0; i < numColors; i++) {
if (color[i] == Color) { if (color[i] == Color) {
used[i] = true; used[i] = true;