bcm accelerated blit: avoid running out of clut data
[enigma2.git] / lib / gdi / accel.cpp
index 5e489eb338d04f8fdc4c6644ce52c12d5fc3f5ae..fc739e92b917e3058b4bbb3f360a94a8b7723b66 100644 (file)
@@ -32,7 +32,7 @@ extern void bcm_accel_blit(
                int dst_addr, int dst_width, int dst_height, int dst_stride,
                int src_x, int src_y, int width, int height,
                int dst_x, int dst_y, int dwidth, int dheight,
-               int pal_addr);
+               int pal_addr, int flags);
 extern void bcm_accel_fill(
                int dst_addr, int dst_width, int dst_height, int dst_stride,
                int x, int y, int width, int height,
@@ -112,7 +112,7 @@ int gAccel::blit(gSurface *dst, const gSurface *src, const eRect &p, const eRect
                        pal_addr = src->stride * src->y;
                        unsigned long *pal = (unsigned long*)(((unsigned char*)src->data) + pal_addr);
                        pal_addr += src->data_phys;
-                       for (i = 0; i < 256; ++i)
+                       for (i = 0; i < src->clut.colors; ++i)
                                *pal++ = src->clut.data[i].argb() ^ 0xFF000000;
                } else
                        return -1; /* unsupported source format */
@@ -122,7 +122,7 @@ int gAccel::blit(gSurface *dst, const gSurface *src, const eRect &p, const eRect
                        dst->data_phys, dst->x, dst->y, dst->stride, 
                        area.left(), area.top(), area.width(), area.height(),
                        p.x(), p.y(), p.width(), p.height(),
-                       pal_addr);
+                       pal_addr, flags);
                return 0;
        }
 #endif