mirror of
https://github.com/novatiq/packages.git
synced 2026-04-29 06:58:39 +01:00
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>
This commit is contained in:
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||
PKG_NAME:=lcd4linux
|
||||
PKG_REV:=1203
|
||||
PKG_VERSION:=r$(PKG_REV)
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://ssl.bulix.org/svn/lcd4linux/trunk/
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
--- 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);
|
||||
Reference in New Issue
Block a user