psplash: fix 1bpp support
authorJeremy Lainé <jeremy.laine@m4x.org>
Wed, 14 Jan 2009 18:29:04 +0000 (19:29 +0100)
committerJeremy Lainé <jeremy.laine@m4x.org>
Wed, 14 Jan 2009 18:29:04 +0000 (19:29 +0100)
packages/psplash/files/psplash_1bpp.patch
packages/psplash/psplash_svn.bb

index e5324f6..3fcc0f7 100644 (file)
@@ -1,5 +1,6 @@
---- orig/psplash-fb.c  (revision 249)
-+++ new/psplash-fb.c   (working copy)
+diff -urN psplash.orig/psplash-fb.c psplash/psplash-fb.c
+--- psplash.orig/psplash-fb.c  2007-08-29 20:27:49.000000000 +0200
++++ psplash/psplash-fb.c       2009-01-14 19:14:15.000000000 +0100
 @@ -62,7 +62,7 @@
        goto fail;
      }
        = ((red >> 3) << 11) | ((green >> 2) << 5) | (blue >> 3);
        break;
 +    case 1:
-+      if ((red + green + blue) > 384)
++      if (((11*red + 16*green + 5*blue) >> 5) >= 128)
 +        *(fb->data + (off >> 3)) |= (1 << (7 - (off & 0x07)));
 +      else
-+        *(fb->data + (off >> 3)) ^= (1 << (7 - (off & 0x07)));
++        *(fb->data + (off >> 3)) &= ~(1 << (7 - (off & 0x07)));
 +      break;
      default:
        /* depth not supported yet */
index 603f1e0..7c4d0a0 100644 (file)
@@ -3,7 +3,7 @@ require psplash-ua.inc
 
 ALTERNATIVE_PRIORITY = "10"
 
-PR = "r14"
+PR = "r15"
 
 SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=psplash;proto=http \
           file://psplash-hand-img.h \