diff options
author | Jeremy Lainé <jeremy.laine@m4x.org> | 2009-01-14 19:29:04 +0100 |
---|---|---|
committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2009-01-14 19:29:04 +0100 |
commit | bf0dbdfc144cfecdaa8b3ee23cc837c96155ef95 (patch) | |
tree | 670a9ddd4b579076c16a35893328ffa9b74cdb0c /packages/psplash/files | |
parent | 2a8ef961ba59bcea14e765da3c5a54befc95cf2b (diff) |
psplash: fix 1bpp support
Diffstat (limited to 'packages/psplash/files')
-rw-r--r-- | packages/psplash/files/psplash_1bpp.patch | 9 |
1 files changed, 5 insertions, 4 deletions
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 */ |