1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-18 05:13:56 +02:00
openwrt-packages/utils/lcd4linux/patches/173-glcd2usb-bigendian-fix.patch
Jonathan McCrohan e3b0a20c44 lcd4linux: fix endian issues with GLCD2USB plugin
Patch submitted by Vladimir Ermakov.

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>
Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>
2015-11-11 23:07:33 +00:00

21 lines
652 B
Diff

--- a/drv_GLCD2USB.c
+++ b/drv_GLCD2USB.c
@@ -48,6 +48,7 @@
#include <fcntl.h>
#include <sys/time.h>
#include <usb.h>
+#include <endian.h>
#include "debug.h"
#include "cfg.h"
@@ -487,6 +488,9 @@ static int drv_GLCD2USB_start(const char
return -1;
}
+ buffer.display_info.width = le16toh(buffer.display_info.width);
+ buffer.display_info.height = le16toh(buffer.display_info.height);
+
info("%s: display name = %s", Name, buffer.display_info.name);
info("%s: display resolution = %d * %d", Name, buffer.display_info.width, buffer.display_info.height);
info("%s: display flags: %x", Name, buffer.display_info.flags);