From bf0dbdfc144cfecdaa8b3ee23cc837c96155ef95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jeremy=20Lain=C3=A9?= Date: Wed, 14 Jan 2009 19:29:04 +0100 Subject: psplash: fix 1bpp support --- packages/psplash/files/psplash_1bpp.patch | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'packages/psplash/files') diff --git a/packages/psplash/files/psplash_1bpp.patch b/packages/psplash/files/psplash_1bpp.patch index e5324f605d..3fcc0f7947 100644 --- a/packages/psplash/files/psplash_1bpp.patch +++ b/packages/psplash/files/psplash_1bpp.patch @@ -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; } @@ -23,10 +24,10 @@ = ((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 */ -- cgit v1.2.3