Merge branch 'obi/master' into experimental
authorAndreas Oberritter <obi@opendreambox.org>
Thu, 13 Jan 2011 00:11:35 +0000 (01:11 +0100)
committerAndreas Oberritter <obi@opendreambox.org>
Thu, 13 Jan 2011 00:11:35 +0000 (01:11 +0100)
1  2 
lib/gdi/accel.cpp

diff --combined lib/gdi/accel.cpp
@@@ -112,7 -112,7 +112,7 @@@ int gAccel::blit(gSurface *dst, const g
                        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 */
@@@ -138,14 -138,12 +138,14 @@@ int gAccel::fill(gSurface *dst, const e
                col);
        return 0;
  #endif
 -#if 0 // def BCM_ACCEL
 -      bcm_accel_fill(
 -              dst->data_phys, dst->x, dst->y, dst->stride, 
 -              area.left(), area.top(), area.width(), area.height(),
 -              col);
 -      return 0;
 +#ifdef BCM_ACCEL
 +      if (!m_bcm_accel_state) {
 +              bcm_accel_fill(
 +                      dst->data_phys, dst->x, dst->y, dst->stride,
 +                      area.left(), area.top(), area.width(), area.height(),
 +                      col);
 +              return 0;
 +      }
  #endif
        return -1;
  }