use ContextMenuActions
[enigma2.git] / lib / gdi / gpixmap.cpp
index a551984f592d85814c83448a860a048e8d100ce0..8fc263999b42df517a96fccd0157e8ee60d9e131 100644 (file)
@@ -191,6 +191,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;
                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))
                {
                
                if ((surface->bpp == 8) && (src.surface->bpp==8))
                {
@@ -468,6 +469,10 @@ fail:
 
 gColor gPalette::findColor(const gRGB &rgb) const
 {
 
 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<colors; t++)
        {
        int difference=1<<30, best_choice=0;
        for (int t=0; t<colors; t++)
        {