173-glcd2usb-bigendian-fix.patch (652B)
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 9 #include "debug.h" 10 #include "cfg.h" 11 @@ -487,6 +488,9 @@ static int drv_GLCD2USB_start(const char 12 return -1; 13 } 14 15 + buffer.display_info.width = le16toh(buffer.display_info.width); 16 + buffer.display_info.height = le16toh(buffer.display_info.height); 17 + 18 info("%s: display name = %s", Name, buffer.display_info.name); 19 info("%s: display resolution = %d * %d", Name, buffer.display_info.width, buffer.display_info.height); 20 info("%s: display flags: %x", Name, buffer.display_info.flags);