Version 1.3.27

- Fixed handling 'page down', which was broken in version 1.3.26 (thanks to Udo
  Richter).
- Modified page scrolling behaviour (based on a suggestion by Patrick Gleichmann).
- The new setup option "OSD/Scroll wraps" can be used to activate wrapping around
  in menu lists (based on a suggestion by Patrick Gleichmann).
- Removed the NPTL check at startup, since several users have reported that VDR
  now runs fine with NPTL.
- Fixed handling VPS timers, so that they only record if the event they are assigned
  to actually has the given VPS time.
- Disabled cVideoRepacker in remux.c, because it has caused several problems
  during recording. If you want to test (and maybe debug) it, activate the line

  //#define TEST_cVideoRepacker

  in remux.c.
- When drawing a bitmap to the OSD, the existing palette of the target can now be
  replaced with the new one instead of adding the new entries (thanks to Andreas
  Regel).
This commit is contained in:
Klaus Schmidinger
2005-06-19 18:00:00 +02:00
parent a616d4b859
commit fef3aa3a7f
16 changed files with 182 additions and 98 deletions

36
osd.c
View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: osd.c 1.61 2005/06/11 14:31:36 kls Exp $
* $Id: osd.c 1.62 2005/06/19 10:43:04 kls Exp $
*/
#include "osd.h"
@@ -86,6 +86,13 @@ void cPalette::Take(const cPalette &Palette, tIndexes *Indexes, tColor ColorFg,
}
}
void cPalette::Replace(const cPalette &Palette)
{
for (int i = 0; i < Palette.numColors; i++)
SetColor(i, Palette.color[i]);
numColors = Palette.numColors;
}
// --- cBitmap ---------------------------------------------------------------
cBitmap::cBitmap(int Width, int Height, int Bpp, int X0, int Y0)
@@ -337,19 +344,28 @@ void cBitmap::DrawPixel(int x, int y, tColor Color)
SetIndex(x, y, Index(Color));
}
void cBitmap::DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg, tColor ColorBg)
void cBitmap::DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg, tColor ColorBg, bool ReplacePalette)
{
if (bitmap && Bitmap.bitmap && Intersects(x, y, x + Bitmap.Width() - 1, y + Bitmap.Height() - 1)) {
if (Covers(x, y, x + Bitmap.Width() - 1, y + Bitmap.Height() - 1))
Reset();
x -= x0;
y -= y0;
tIndexes Indexes;
Take(Bitmap, &Indexes, ColorFg, ColorBg);
for (int ix = 0; ix < Bitmap.width; ix++) {
for (int iy = 0; iy < Bitmap.height; iy++)
SetIndex(x + ix, y + iy, Indexes[int(Bitmap.bitmap[Bitmap.width * iy + ix])]);
}
if (ReplacePalette && Covers(x + x0, y + y0, x + x0 + Bitmap.Width() - 1, y + y0 + Bitmap.Height() - 1)) {
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]);
}
}
else {
tIndexes Indexes;
Take(Bitmap, &Indexes, ColorFg, ColorBg);
for (int ix = 0; ix < Bitmap.width; ix++) {
for (int iy = 0; iy < Bitmap.height; iy++)
SetIndex(x + ix, y + iy, Indexes[int(Bitmap.bitmap[Bitmap.width * iy + ix])]);
}
}
}
}
@@ -665,10 +681,10 @@ void cOsd::DrawPixel(int x, int y, tColor Color)
bitmaps[i]->DrawPixel(x, y, Color);
}
void cOsd::DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg, tColor ColorBg)
void cOsd::DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg, tColor ColorBg, bool ReplacePalette)
{
for (int i = 0; i < numBitmaps; i++)
bitmaps[i]->DrawBitmap(x, y, Bitmap, ColorFg, ColorBg);
bitmaps[i]->DrawBitmap(x, y, Bitmap, ColorFg, ColorBg, ReplacePalette);
}
void cOsd::DrawText(int x, int y, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font, int Width, int Height, int Alignment)