diff options
Diffstat (limited to 'patches')
-rw-r--r-- | patches/vdr-1.2.6-256-indexes.diff | 76 | ||||
-rw-r--r-- | patches/vdr-1.2.6-256-palette.diff | 137 | ||||
-rw-r--r-- | patches/vdr-1.2.6-indexes.diff | 85 | ||||
-rw-r--r-- | patches/vdr-1.2.6-palette.diff | 139 | ||||
-rw-r--r-- | patches/vdr-osd.diff | 51 |
5 files changed, 51 insertions, 437 deletions
diff --git a/patches/vdr-1.2.6-256-indexes.diff b/patches/vdr-1.2.6-256-indexes.diff deleted file mode 100644 index 5b5b5fa..0000000 --- a/patches/vdr-1.2.6-256-indexes.diff +++ /dev/null @@ -1,76 +0,0 @@ ---- vdrold/osdbase.c 2004-06-13 13:52:47.000000000 +0200 -+++ vdr-1.2.6/osdbase.c 2004-06-13 13:49:23.000000000 +0200 -@@ -116,7 +116,7 @@ - fontType = fontOsd; - font = NULL; - if (width > 0 && height > 0) { -- bitmap = MALLOC(char, width * height); -+ bitmap = MALLOC(unsigned char, width * height); - if (bitmap) { - Clean(); - memset(bitmap, 0x00, width * height); -@@ -188,7 +188,7 @@ - dirtyY2 = -1; - } - --void cBitmap::SetIndex(int x, int y, char Index) -+void cBitmap::SetIndex(int x, int y, unsigned char Index) - { - if (bitmap) { - if (0 <= x && x < width && 0 <= y && y < height) { -@@ -269,7 +269,7 @@ - Fill(0, 0, width - 1, height - 1, clrBackground); - } - --const char *cBitmap::Data(int x, int y) -+const unsigned char *cBitmap::Data(int x, int y) - { - return &bitmap[y * width + x]; - } -@@ -329,7 +329,7 @@ - cBitmap::Text(x, y, s, ColorFg, ColorBg); - } - --const char *cWindow::Data(int x, int y) -+const unsigned char *cWindow::Data(int x, int y) - { - return cBitmap::Data(x, y); - } ---- vdrold/osdbase.h 2004-06-13 13:52:47.000000000 +0200 -+++ vdr-1.2.6/osdbase.h 2004-06-13 13:48:49.000000000 +0200 -@@ -75,7 +75,7 @@ - private: - cFont *font; - eDvbFont fontType; -- char *bitmap; -+ unsigned char *bitmap; - bool clearWithBackground; - protected: - int width, height; -@@ -86,7 +86,7 @@ - bool ClearWithBackground(void) { return clearWithBackground; } - eDvbFont SetFont(eDvbFont Font); - bool Dirty(int &x1, int &y1, int &x2, int &y2); -- void SetIndex(int x, int y, char Index); -+ void SetIndex(int x, int y, unsigned char Index); - void SetPixel(int x, int y, eDvbColor Color); - void SetBitmap(int x, int y, const cBitmap &Bitmap); - int Width(void) { return width; } -@@ -97,7 +97,7 @@ - void Fill(int x1, int y1, int x2, int y2, eDvbColor Color); - void Clean(void); - void Clear(void); -- const char *Data(int x, int y); -+ const unsigned char *Data(int x, int y); - }; - - #define MAXNUMWINDOWS 7 // OSD windows are counted 1...7 -@@ -122,7 +122,7 @@ - void Fill(int x1, int y1, int x2, int y2, eDvbColor Color); - void SetBitmap(int x, int y, const cBitmap &Bitmap); - void Text(int x, int y, const char *s, eDvbColor ColorFg = clrWhite, eDvbColor ColorBg = clrBackground); -- const char *Data(int x, int y); -+ const unsigned char *Data(int x, int y); - }; - - typedef int tWindowHandle; diff --git a/patches/vdr-1.2.6-256-palette.diff b/patches/vdr-1.2.6-256-palette.diff deleted file mode 100644 index aab4f69..0000000 --- a/patches/vdr-1.2.6-256-palette.diff +++ /dev/null @@ -1,137 +0,0 @@ ---- vdrold/osdbase.c 2004-06-13 13:58:22.000000000 +0200 -+++ vdr-1.2.6/osdbase.c 2004-06-13 14:01:26.000000000 +0200 -@@ -104,6 +104,12 @@ - } - } - -+void cPalette::Replace(const cPalette &Palette) -+{ -+ for (int i = 0; i < Palette.numColors; i++) -+ SetColor(i, Palette.color[i]); -+} -+ - // --- cBitmap --------------------------------------------------------------- - - cBitmap::cBitmap(int Width, int Height, int Bpp, bool ClearWithBackground) -@@ -116,7 +122,7 @@ - fontType = fontOsd; - font = NULL; - if (width > 0 && height > 0) { -- bitmap = MALLOC(char, width * height); -+ bitmap = MALLOC(unsigned char, width * height); - if (bitmap) { - Clean(); - memset(bitmap, 0x00, width * height); -@@ -188,7 +194,7 @@ - dirtyY2 = -1; - } - --void cBitmap::SetIndex(int x, int y, char Index) -+void cBitmap::SetIndex(int x, int y, unsigned char Index) - { - if (bitmap) { - if (0 <= x && x < width && 0 <= y && y < height) { -@@ -220,6 +226,17 @@ - } - } - -+void cBitmap::SetBitmap256(int x, int y, const cBitmap &Bitmap) -+{ -+ if (bitmap && Bitmap.bitmap) { -+ Replace(Bitmap); -+ for (int ix = 0; ix < Bitmap.width; ix++) { -+ for (int iy = 0; iy < Bitmap.height; iy++) -+ SetIndex(x + ix, y + iy, Bitmap.bitmap[Bitmap.width * iy + ix]); -+ } -+ } -+} -+ - int cBitmap::Width(unsigned char c) - { - return font ? font->Width(c) : -1; -@@ -269,7 +286,7 @@ - Fill(0, 0, width - 1, height - 1, clrBackground); - } - --const char *cBitmap::Data(int x, int y) -+const unsigned char *cBitmap::Data(int x, int y) - { - return &bitmap[y * width + x]; - } -@@ -317,7 +334,10 @@ - x -= x0; - y -= y0; - } -- cBitmap::SetBitmap(x, y, Bitmap); -+ if (bpp == 8) -+ cBitmap::SetBitmap256(x, y, Bitmap); -+ else -+ cBitmap::SetBitmap(x, y, Bitmap); - } - - void cWindow::Text(int x, int y, const char *s, eDvbColor ColorFg, eDvbColor ColorBg) -@@ -329,7 +349,7 @@ - cBitmap::Text(x, y, s, ColorFg, ColorBg); - } - --const char *cWindow::Data(int x, int y) -+const unsigned char *cWindow::Data(int x, int y) - { - return cBitmap::Data(x, y); - } ---- vdrold/osdbase.h 2004-06-13 14:05:47.000000000 +0200 -+++ vdr-1.2.6/osdbase.h 2004-06-13 13:59:45.000000000 +0200 -@@ -14,6 +14,7 @@ - #include "font.h" - - #define MAXNUMCOLORS 256 -+#define VDR_OSDPIP_PATCHED - - enum eDvbColor { - #ifdef DEBUG_OSD -@@ -69,13 +70,14 @@ - // stored yet, NumColors will be set to 0 and the function will - // return NULL. - void Take(const cPalette &Palette, tIndexes *Indexes = NULL); -+ void Replace(const cPalette &Palette); - }; - - class cBitmap : public cPalette { - private: - cFont *font; - eDvbFont fontType; -- char *bitmap; -+ unsigned char *bitmap; - bool clearWithBackground; - protected: - int width, height; -@@ -86,9 +88,10 @@ - bool ClearWithBackground(void) { return clearWithBackground; } - eDvbFont SetFont(eDvbFont Font); - bool Dirty(int &x1, int &y1, int &x2, int &y2); -- void SetIndex(int x, int y, char Index); -+ void SetIndex(int x, int y, unsigned char Index); - void SetPixel(int x, int y, eDvbColor Color); - void SetBitmap(int x, int y, const cBitmap &Bitmap); -+ void SetBitmap256(int x, int y, const cBitmap &Bitmap); - int Width(void) { return width; } - int Width(unsigned char c); - int Width(const char *s); -@@ -97,7 +100,7 @@ - void Fill(int x1, int y1, int x2, int y2, eDvbColor Color); - void Clean(void); - void Clear(void); -- const char *Data(int x, int y); -+ const unsigned char *Data(int x, int y); - }; - - #define MAXNUMWINDOWS 7 // OSD windows are counted 1...7 -@@ -122,7 +125,7 @@ - void Fill(int x1, int y1, int x2, int y2, eDvbColor Color); - void SetBitmap(int x, int y, const cBitmap &Bitmap); - void Text(int x, int y, const char *s, eDvbColor ColorFg = clrWhite, eDvbColor ColorBg = clrBackground); -- const char *Data(int x, int y); -+ const unsigned char *Data(int x, int y); - }; - - typedef int tWindowHandle; diff --git a/patches/vdr-1.2.6-indexes.diff b/patches/vdr-1.2.6-indexes.diff deleted file mode 100644 index 26ec1be..0000000 --- a/patches/vdr-1.2.6-indexes.diff +++ /dev/null @@ -1,85 +0,0 @@ ---- vdrold/osdbase.c 2004-06-13 13:52:47.000000000 +0200 -+++ vdr-1.2.6/osdbase.c 2004-06-13 13:49:23.000000000 +0200 -@@ -116,7 +116,7 @@ - fontType = fontOsd; - font = NULL; - if (width > 0 && height > 0) { -- bitmap = MALLOC(char, width * height); -+ bitmap = MALLOC(unsigned char, width * height); - if (bitmap) { - Clean(); - memset(bitmap, 0x00, width * height); -@@ -188,7 +188,7 @@ - dirtyY2 = -1; - } - --void cBitmap::SetIndex(int x, int y, char Index) -+void cBitmap::SetIndex(int x, int y, unsigned char Index) - { - if (bitmap) { - if (0 <= x && x < width && 0 <= y && y < height) { -@@ -269,7 +269,7 @@ - Fill(0, 0, width - 1, height - 1, clrBackground); - } - --const char *cBitmap::Data(int x, int y) -+const unsigned char *cBitmap::Data(int x, int y) - { - return &bitmap[y * width + x]; - } -@@ -329,7 +329,7 @@ - cBitmap::Text(x, y, s, ColorFg, ColorBg); - } - --const char *cWindow::Data(int x, int y) -+const unsigned char *cWindow::Data(int x, int y) - { - return cBitmap::Data(x, y); - } ---- vdrold/osdbase.h 2004-06-13 13:52:47.000000000 +0200 -+++ vdr-1.2.6/osdbase.h 2004-06-13 13:48:49.000000000 +0200 -@@ -13,7 +13,7 @@ - #include <stdio.h> - #include "font.h" - --#define MAXNUMCOLORS 16 -+#define MAXNUMCOLORS 256 - - enum eDvbColor { - #ifdef DEBUG_OSD -@@ -75,7 +75,7 @@ - private: - cFont *font; - eDvbFont fontType; -- char *bitmap; -+ unsigned char *bitmap; - bool clearWithBackground; - protected: - int width, height; -@@ -86,7 +86,7 @@ - bool ClearWithBackground(void) { return clearWithBackground; } - eDvbFont SetFont(eDvbFont Font); - bool Dirty(int &x1, int &y1, int &x2, int &y2); -- void SetIndex(int x, int y, char Index); -+ void SetIndex(int x, int y, unsigned char Index); - void SetPixel(int x, int y, eDvbColor Color); - void SetBitmap(int x, int y, const cBitmap &Bitmap); - int Width(void) { return width; } -@@ -97,7 +97,7 @@ - void Fill(int x1, int y1, int x2, int y2, eDvbColor Color); - void Clean(void); - void Clear(void); -- const char *Data(int x, int y); -+ const unsigned char *Data(int x, int y); - }; - - #define MAXNUMWINDOWS 7 // OSD windows are counted 1...7 -@@ -122,7 +122,7 @@ - void Fill(int x1, int y1, int x2, int y2, eDvbColor Color); - void SetBitmap(int x, int y, const cBitmap &Bitmap); - void Text(int x, int y, const char *s, eDvbColor ColorFg = clrWhite, eDvbColor ColorBg = clrBackground); -- const char *Data(int x, int y); -+ const unsigned char *Data(int x, int y); - }; - - typedef int tWindowHandle; diff --git a/patches/vdr-1.2.6-palette.diff b/patches/vdr-1.2.6-palette.diff deleted file mode 100644 index 46559a9..0000000 --- a/patches/vdr-1.2.6-palette.diff +++ /dev/null @@ -1,139 +0,0 @@ ---- vdrold/osdbase.c 2004-06-13 13:58:22.000000000 +0200 -+++ vdr-1.2.6/osdbase.c 2004-06-13 14:01:26.000000000 +0200 -@@ -104,6 +104,12 @@ - } - } - -+void cPalette::Replace(const cPalette &Palette) -+{ -+ for (int i = 0; i < Palette.numColors; i++) -+ SetColor(i, Palette.color[i]); -+} -+ - // --- cBitmap --------------------------------------------------------------- - - cBitmap::cBitmap(int Width, int Height, int Bpp, bool ClearWithBackground) -@@ -116,7 +122,7 @@ - fontType = fontOsd; - font = NULL; - if (width > 0 && height > 0) { -- bitmap = MALLOC(char, width * height); -+ bitmap = MALLOC(unsigned char, width * height); - if (bitmap) { - Clean(); - memset(bitmap, 0x00, width * height); -@@ -188,7 +194,7 @@ - dirtyY2 = -1; - } - --void cBitmap::SetIndex(int x, int y, char Index) -+void cBitmap::SetIndex(int x, int y, unsigned char Index) - { - if (bitmap) { - if (0 <= x && x < width && 0 <= y && y < height) { -@@ -220,6 +226,17 @@ - } - } - -+void cBitmap::SetBitmap256(int x, int y, const cBitmap &Bitmap) -+{ -+ if (bitmap && Bitmap.bitmap) { -+ Replace(Bitmap); -+ for (int ix = 0; ix < Bitmap.width; ix++) { -+ for (int iy = 0; iy < Bitmap.height; iy++) -+ SetIndex(x + ix, y + iy, Bitmap.bitmap[Bitmap.width * iy + ix]); -+ } -+ } -+} -+ - int cBitmap::Width(unsigned char c) - { - return font ? font->Width(c) : -1; -@@ -269,7 +286,7 @@ - Fill(0, 0, width - 1, height - 1, clrBackground); - } - --const char *cBitmap::Data(int x, int y) -+const unsigned char *cBitmap::Data(int x, int y) - { - return &bitmap[y * width + x]; - } -@@ -317,7 +334,10 @@ - x -= x0; - y -= y0; - } -- cBitmap::SetBitmap(x, y, Bitmap); -+ if (bpp == 8) -+ cBitmap::SetBitmap256(x, y, Bitmap); -+ else -+ cBitmap::SetBitmap(x, y, Bitmap); - } - - void cWindow::Text(int x, int y, const char *s, eDvbColor ColorFg, eDvbColor ColorBg) -@@ -329,7 +349,7 @@ - cBitmap::Text(x, y, s, ColorFg, ColorBg); - } - --const char *cWindow::Data(int x, int y) -+const unsigned char *cWindow::Data(int x, int y) - { - return cBitmap::Data(x, y); - } ---- vdrold/osdbase.h 2004-06-13 14:05:47.000000000 +0200 -+++ vdr-1.2.6/osdbase.h 2004-06-13 13:59:45.000000000 +0200 -@@ -13,7 +13,8 @@ - #include <stdio.h> - #include "font.h" - --#define MAXNUMCOLORS 16 -+#define MAXNUMCOLORS 256 -+#define VDR_OSDPIP_PATCHED - - enum eDvbColor { - #ifdef DEBUG_OSD -@@ -69,13 +70,14 @@ - // stored yet, NumColors will be set to 0 and the function will - // return NULL. - void Take(const cPalette &Palette, tIndexes *Indexes = NULL); -+ void Replace(const cPalette &Palette); - }; - - class cBitmap : public cPalette { - private: - cFont *font; - eDvbFont fontType; -- char *bitmap; -+ unsigned char *bitmap; - bool clearWithBackground; - protected: - int width, height; -@@ -86,9 +88,10 @@ - bool ClearWithBackground(void) { return clearWithBackground; } - eDvbFont SetFont(eDvbFont Font); - bool Dirty(int &x1, int &y1, int &x2, int &y2); -- void SetIndex(int x, int y, char Index); -+ void SetIndex(int x, int y, unsigned char Index); - void SetPixel(int x, int y, eDvbColor Color); - void SetBitmap(int x, int y, const cBitmap &Bitmap); -+ void SetBitmap256(int x, int y, const cBitmap &Bitmap); - int Width(void) { return width; } - int Width(unsigned char c); - int Width(const char *s); -@@ -97,7 +100,7 @@ - void Fill(int x1, int y1, int x2, int y2, eDvbColor Color); - void Clean(void); - void Clear(void); -- const char *Data(int x, int y); -+ const unsigned char *Data(int x, int y); - }; - - #define MAXNUMWINDOWS 7 // OSD windows are counted 1...7 -@@ -122,7 +125,7 @@ - void Fill(int x1, int y1, int x2, int y2, eDvbColor Color); - void SetBitmap(int x, int y, const cBitmap &Bitmap); - void Text(int x, int y, const char *s, eDvbColor ColorFg = clrWhite, eDvbColor ColorBg = clrBackground); -- const char *Data(int x, int y); -+ const unsigned char *Data(int x, int y); - }; - - typedef int tWindowHandle; diff --git a/patches/vdr-osd.diff b/patches/vdr-osd.diff new file mode 100644 index 0000000..0acc0f2 --- /dev/null +++ b/patches/vdr-osd.diff @@ -0,0 +1,51 @@ +diff -Nu vdr-1.3.24/osd.c vdr/osd.c +--- vdr-1.3.24/osd.c 2004-12-19 13:27:38.000000000 +0100 ++++ vdr/osd.c 2005-05-14 13:59:03.000000000 +0200 +@@ -574,7 +574,7 @@ + + // --- cOsd ------------------------------------------------------------------ + +-bool cOsd::isOpen = false; ++int cOsd::isOpen = 0; + + cOsd::cOsd(int Left, int Top) + { +@@ -585,7 +585,7 @@ + left = Left; + top = Top; + width = height = 0; +- isOpen = true; ++ isOpen++; + } + + cOsd::~cOsd() +@@ -593,7 +593,7 @@ + for (int i = 0; i < numBitmaps; i++) + delete bitmaps[i]; + delete savedRegion; +- isOpen = false; ++ isOpen--; + } + + cBitmap *cOsd::GetBitmap(int Area) +diff -Nu vdr-1.3.24/osd.h vdr/osd.h +--- vdr-1.3.24/osd.h 2004-10-16 12:33:44.000000000 +0200 ++++ vdr/osd.h 2005-05-14 13:58:08.000000000 +0200 +@@ -210,7 +210,7 @@ + class cOsd { + friend class cOsdProvider; + private: +- static bool isOpen; ++ static int isOpen; + cBitmap *savedRegion; + cBitmap *bitmaps[MAXOSDAREAS]; + int numBitmaps; +@@ -235,7 +235,7 @@ + public: + virtual ~cOsd(); + ///< Shuts down the OSD. +- static bool IsOpen(void) { return isOpen; } ++ static int IsOpen(void) { return isOpen; } + int Left(void) { return left; } + int Top(void) { return top; } + int Width(void) { return width; } |