1
0

173-glcd2usb-bigendian-fix.patch 652 B

1234567891011121314151617181920
  1. --- a/drv_GLCD2USB.c
  2. +++ b/drv_GLCD2USB.c
  3. @@ -48,6 +48,7 @@
  4. #include <fcntl.h>
  5. #include <sys/time.h>
  6. #include <usb.h>
  7. +#include <endian.h>
  8. #include "debug.h"
  9. #include "cfg.h"
  10. @@ -487,6 +488,9 @@ static int drv_GLCD2USB_start(const char
  11. return -1;
  12. }
  13. + buffer.display_info.width = le16toh(buffer.display_info.width);
  14. + buffer.display_info.height = le16toh(buffer.display_info.height);
  15. +
  16. info("%s: display name = %s", Name, buffer.display_info.name);
  17. info("%s: display resolution = %d * %d", Name, buffer.display_info.width, buffer.display_info.height);
  18. info("%s: display flags: %x", Name, buffer.display_info.flags);