X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/54b9e2790954b623c99823ab64782d4e39c128bf..899dc0f3d28c8321954f041ebd0c5611aec25857:/lib/gdi/gpixmap.cpp diff --git a/lib/gdi/gpixmap.cpp b/lib/gdi/gpixmap.cpp index a551984f..aaffbaa7 100644 --- a/lib/gdi/gpixmap.cpp +++ b/lib/gdi/gpixmap.cpp @@ -182,6 +182,7 @@ void gPixmap::blit(const gPixmap &src, ePoint pos, const gRegion &clip, int flag eRect area=eRect(pos, src.size()); area&=clip.rects[i]; area&=eRect(ePoint(0, 0), size()); + if ((area.width()<0) || (area.height()<0)) continue; @@ -191,6 +192,7 @@ void gPixmap::blit(const gPixmap &src, ePoint pos, const gRegion &clip, int flag if ((surface->data_phys && src.surface->data_phys) && (gAccel::getInstance())) if (!gAccel::getInstance()->blit(surface, src.surface, area.topLeft(), srcarea, flag)) continue; + flag &= ~ blitAlphaBlend; if ((surface->bpp == 8) && (src.surface->bpp==8)) { @@ -308,7 +310,7 @@ void gPixmap::blit(const gPixmap &src, ePoint pos, const gRegion &clip, int flag // use duff's device here! while (width--) { - if (!*src) + if (*src==0x01) { src++; dst++; @@ -468,6 +470,10 @@ fail: gColor gPalette::findColor(const gRGB &rgb) const { + /* grayscale? */ + if (!data) + return (rgb.r + rgb.g + rgb.b) / 3; + int difference=1<<30, best_choice=0; for (int t=0; t