trini

fbv_endian_hack.patch

Nov 22nd, 2011
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. --- fbv-1.0b/fb_display.c.orig 2011-11-21 16:44:50.172260000 -0500
  2. +++ fbv-1.0b/fb_display.c 2011-11-21 16:45:46.808260000 -0500
  3. @@ -31,6 +31,7 @@
  4. #include <asm/types.h>
  5. #include <string.h>
  6. #include <errno.h>
  7. +#include <endian.h>
  8. #include "config.h"
  9. /* Public Use Functions:
  10. *
  11. @@ -300,7 +301,7 @@
  12.  
  13. inline static unsigned short make16color(unsigned char r, unsigned char g, unsigned char b)
  14. {
  15. - return (
  16. + return htobe16(
  17. (((r >> 3) & 31) << 11) |
  18. (((g >> 2) & 63) << 5) |
  19. ((b >> 3) & 31) );
  20.  
  21.  
Add Comment
Please, Sign In to add comment