Patched binaries for hidapi Windows.
authormark <mark@2c67d6c2-4361-4cd7-bd83-1149b1926c9b>
Sun, 22 Dec 2013 07:10:27 +0000 (07:10 +0000)
committermark <mark@2c67d6c2-4361-4cd7-bd83-1149b1926c9b>
Sun, 22 Dec 2013 07:10:27 +0000 (07:10 +0000)
See readme.txt.

git-svn-id: https://valelab.ucsf.edu/svn/3rdpartypublic@155 2c67d6c2-4361-4cd7-bd83-1149b1926c9b

25 files changed:
hidapi/build-3a66d4e513-patched/readme.txt [new file with mode: 0644]
hidapi/build-3a66d4e513-patched/windows/Win32/Debug/hidapi.dll [new file with mode: 0644]
hidapi/build-3a66d4e513-patched/windows/Win32/Debug/hidapi.lib [new file with mode: 0644]
hidapi/build-3a66d4e513-patched/windows/Win32/Debug/hidapi.pdb [new file with mode: 0644]
hidapi/build-3a66d4e513-patched/windows/Win32/Release/hidapi.dll [new file with mode: 0644]
hidapi/build-3a66d4e513-patched/windows/Win32/Release/hidapi.lib [new file with mode: 0644]
hidapi/build-3a66d4e513-patched/windows/Win32/Release/hidapi.pdb [new file with mode: 0644]
hidapi/build-3a66d4e513-patched/windows/x64/Debug/hidapi.dll [new file with mode: 0644]
hidapi/build-3a66d4e513-patched/windows/x64/Debug/hidapi.lib [new file with mode: 0644]
hidapi/build-3a66d4e513-patched/windows/x64/Debug/hidapi.pdb [new file with mode: 0644]
hidapi/build-3a66d4e513-patched/windows/x64/Release/hidapi.dll [new file with mode: 0644]
hidapi/build-3a66d4e513-patched/windows/x64/Release/hidapi.lib [new file with mode: 0644]
hidapi/build-3a66d4e513-patched/windows/x64/Release/hidapi.pdb [new file with mode: 0644]
hidapi/build-3a66d4e513/windows/Win32/Debug/hidapi.dll [deleted file]
hidapi/build-3a66d4e513/windows/Win32/Debug/hidapi.lib [deleted file]
hidapi/build-3a66d4e513/windows/Win32/Debug/hidapi.pdb [deleted file]
hidapi/build-3a66d4e513/windows/Win32/Release/hidapi.dll [deleted file]
hidapi/build-3a66d4e513/windows/Win32/Release/hidapi.lib [deleted file]
hidapi/build-3a66d4e513/windows/Win32/Release/hidapi.pdb [deleted file]
hidapi/build-3a66d4e513/windows/x64/Debug/hidapi.dll [deleted file]
hidapi/build-3a66d4e513/windows/x64/Debug/hidapi.lib [deleted file]
hidapi/build-3a66d4e513/windows/x64/Debug/hidapi.pdb [deleted file]
hidapi/build-3a66d4e513/windows/x64/Release/hidapi.dll [deleted file]
hidapi/build-3a66d4e513/windows/x64/Release/hidapi.lib [deleted file]
hidapi/build-3a66d4e513/windows/x64/Release/hidapi.pdb [deleted file]

diff --git a/hidapi/build-3a66d4e513-patched/readme.txt b/hidapi/build-3a66d4e513-patched/readme.txt
new file mode 100644 (file)
index 0000000..33e481a
--- /dev/null
@@ -0,0 +1,58 @@
+These binaries were built from hidapi git commit 3a66d4e513, with the following\r
+patch applied. The patch has been submitted upstream.\r
+\r
+\r
+\r
+From ba5f2772310c82970f539af186bbb11f99c08377 Mon Sep 17 00:00:00 2001\r
+From: "Mark A. Tsuchida" <marktsuchida@gmail.com>\r
+Date: Sat, 21 Dec 2013 13:01:28 -0800\r
+Subject: windows: limit hid_read() return value to buffer length\r
+\r
+hid_read() and hid_read_timeout() now return the number of bytes copied,\r
+instead of the number of bytes returned by GetOverlappedResult() (which is the\r
+maximum report size for the device). This limits the return value to the\r
+requested length (buffer size), matching the behavior on other platforms.\r
+---\r
+ windows/hid.c | 6 +++---\r
+ 1 file changed, 3 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/windows/hid.c b/windows/hid.c\r
+index 3dee05b..89d07b1 100755\r
+--- a/windows/hid.c\r
++++ b/windows/hid.c\r
+@@ -652,6 +652,7 @@ end_of_function:\r
+ int HID_API_EXPORT HID_API_CALL hid_read_timeout(hid_device *dev, unsigned char *data, size_t length, int milliseconds)\r
+ {\r
+       DWORD bytes_read = 0;\r
++      size_t copy_len = 0;\r
+       BOOL res;\r
\r
+       /* Copy the handle for convenience. */\r
+@@ -699,14 +700,13 @@ int HID_API_EXPORT HID_API_CALL hid_read_timeout(hid_device *dev, unsigned char\r
+                          number (0x0) on the beginning of the report anyway. To make this\r
+                          work like the other platforms, and to make it work more like the\r
+                          HID spec, we'll skip over this byte. */\r
+-                      size_t copy_len;\r
+                       bytes_read--;\r
+                       copy_len = length > bytes_read ? bytes_read : length;\r
+                       memcpy(data, dev->read_buf+1, copy_len);\r
+               }\r
+               else {\r
+                       /* Copy the whole buffer, report number and all. */\r
+-                      size_t copy_len = length > bytes_read ? bytes_read : length;\r
++                      copy_len = length > bytes_read ? bytes_read : length;\r
+                       memcpy(data, dev->read_buf, copy_len);\r
+               }\r
+       }\r
+@@ -717,7 +717,7 @@ end_of_function:\r
+               return -1;\r
+       }\r
+       \r
+-      return bytes_read;\r
++      return copy_len;\r
+ }\r
\r
+ int HID_API_EXPORT HID_API_CALL hid_read(hid_device *dev, unsigned char *data, size_t length)\r
+-- \r
+1.8.4.msysgit.0\r
+\r
diff --git a/hidapi/build-3a66d4e513-patched/windows/Win32/Debug/hidapi.dll b/hidapi/build-3a66d4e513-patched/windows/Win32/Debug/hidapi.dll
new file mode 100644 (file)
index 0000000..d091c39
Binary files /dev/null and b/hidapi/build-3a66d4e513-patched/windows/Win32/Debug/hidapi.dll differ
diff --git a/hidapi/build-3a66d4e513-patched/windows/Win32/Debug/hidapi.lib b/hidapi/build-3a66d4e513-patched/windows/Win32/Debug/hidapi.lib
new file mode 100644 (file)
index 0000000..8d497b2
Binary files /dev/null and b/hidapi/build-3a66d4e513-patched/windows/Win32/Debug/hidapi.lib differ
diff --git a/hidapi/build-3a66d4e513-patched/windows/Win32/Debug/hidapi.pdb b/hidapi/build-3a66d4e513-patched/windows/Win32/Debug/hidapi.pdb
new file mode 100644 (file)
index 0000000..d9f9af8
Binary files /dev/null and b/hidapi/build-3a66d4e513-patched/windows/Win32/Debug/hidapi.pdb differ
diff --git a/hidapi/build-3a66d4e513-patched/windows/Win32/Release/hidapi.dll b/hidapi/build-3a66d4e513-patched/windows/Win32/Release/hidapi.dll
new file mode 100644 (file)
index 0000000..c90954b
Binary files /dev/null and b/hidapi/build-3a66d4e513-patched/windows/Win32/Release/hidapi.dll differ
diff --git a/hidapi/build-3a66d4e513-patched/windows/Win32/Release/hidapi.lib b/hidapi/build-3a66d4e513-patched/windows/Win32/Release/hidapi.lib
new file mode 100644 (file)
index 0000000..6d98ec0
Binary files /dev/null and b/hidapi/build-3a66d4e513-patched/windows/Win32/Release/hidapi.lib differ
diff --git a/hidapi/build-3a66d4e513-patched/windows/Win32/Release/hidapi.pdb b/hidapi/build-3a66d4e513-patched/windows/Win32/Release/hidapi.pdb
new file mode 100644 (file)
index 0000000..6cee02c
Binary files /dev/null and b/hidapi/build-3a66d4e513-patched/windows/Win32/Release/hidapi.pdb differ
diff --git a/hidapi/build-3a66d4e513-patched/windows/x64/Debug/hidapi.dll b/hidapi/build-3a66d4e513-patched/windows/x64/Debug/hidapi.dll
new file mode 100644 (file)
index 0000000..256cb11
Binary files /dev/null and b/hidapi/build-3a66d4e513-patched/windows/x64/Debug/hidapi.dll differ
diff --git a/hidapi/build-3a66d4e513-patched/windows/x64/Debug/hidapi.lib b/hidapi/build-3a66d4e513-patched/windows/x64/Debug/hidapi.lib
new file mode 100644 (file)
index 0000000..d4b28f9
Binary files /dev/null and b/hidapi/build-3a66d4e513-patched/windows/x64/Debug/hidapi.lib differ
diff --git a/hidapi/build-3a66d4e513-patched/windows/x64/Debug/hidapi.pdb b/hidapi/build-3a66d4e513-patched/windows/x64/Debug/hidapi.pdb
new file mode 100644 (file)
index 0000000..b0e1035
Binary files /dev/null and b/hidapi/build-3a66d4e513-patched/windows/x64/Debug/hidapi.pdb differ
diff --git a/hidapi/build-3a66d4e513-patched/windows/x64/Release/hidapi.dll b/hidapi/build-3a66d4e513-patched/windows/x64/Release/hidapi.dll
new file mode 100644 (file)
index 0000000..ca8b383
Binary files /dev/null and b/hidapi/build-3a66d4e513-patched/windows/x64/Release/hidapi.dll differ
diff --git a/hidapi/build-3a66d4e513-patched/windows/x64/Release/hidapi.lib b/hidapi/build-3a66d4e513-patched/windows/x64/Release/hidapi.lib
new file mode 100644 (file)
index 0000000..01bf2d6
Binary files /dev/null and b/hidapi/build-3a66d4e513-patched/windows/x64/Release/hidapi.lib differ
diff --git a/hidapi/build-3a66d4e513-patched/windows/x64/Release/hidapi.pdb b/hidapi/build-3a66d4e513-patched/windows/x64/Release/hidapi.pdb
new file mode 100644 (file)
index 0000000..1bd5d57
Binary files /dev/null and b/hidapi/build-3a66d4e513-patched/windows/x64/Release/hidapi.pdb differ
diff --git a/hidapi/build-3a66d4e513/windows/Win32/Debug/hidapi.dll b/hidapi/build-3a66d4e513/windows/Win32/Debug/hidapi.dll
deleted file mode 100644 (file)
index 8c7e4ae..0000000
Binary files a/hidapi/build-3a66d4e513/windows/Win32/Debug/hidapi.dll and /dev/null differ
diff --git a/hidapi/build-3a66d4e513/windows/Win32/Debug/hidapi.lib b/hidapi/build-3a66d4e513/windows/Win32/Debug/hidapi.lib
deleted file mode 100644 (file)
index ad79392..0000000
Binary files a/hidapi/build-3a66d4e513/windows/Win32/Debug/hidapi.lib and /dev/null differ
diff --git a/hidapi/build-3a66d4e513/windows/Win32/Debug/hidapi.pdb b/hidapi/build-3a66d4e513/windows/Win32/Debug/hidapi.pdb
deleted file mode 100644 (file)
index 68ab4f5..0000000
Binary files a/hidapi/build-3a66d4e513/windows/Win32/Debug/hidapi.pdb and /dev/null differ
diff --git a/hidapi/build-3a66d4e513/windows/Win32/Release/hidapi.dll b/hidapi/build-3a66d4e513/windows/Win32/Release/hidapi.dll
deleted file mode 100644 (file)
index 5649f52..0000000
Binary files a/hidapi/build-3a66d4e513/windows/Win32/Release/hidapi.dll and /dev/null differ
diff --git a/hidapi/build-3a66d4e513/windows/Win32/Release/hidapi.lib b/hidapi/build-3a66d4e513/windows/Win32/Release/hidapi.lib
deleted file mode 100644 (file)
index a114d66..0000000
Binary files a/hidapi/build-3a66d4e513/windows/Win32/Release/hidapi.lib and /dev/null differ
diff --git a/hidapi/build-3a66d4e513/windows/Win32/Release/hidapi.pdb b/hidapi/build-3a66d4e513/windows/Win32/Release/hidapi.pdb
deleted file mode 100644 (file)
index 9343dab..0000000
Binary files a/hidapi/build-3a66d4e513/windows/Win32/Release/hidapi.pdb and /dev/null differ
diff --git a/hidapi/build-3a66d4e513/windows/x64/Debug/hidapi.dll b/hidapi/build-3a66d4e513/windows/x64/Debug/hidapi.dll
deleted file mode 100644 (file)
index bf62f89..0000000
Binary files a/hidapi/build-3a66d4e513/windows/x64/Debug/hidapi.dll and /dev/null differ
diff --git a/hidapi/build-3a66d4e513/windows/x64/Debug/hidapi.lib b/hidapi/build-3a66d4e513/windows/x64/Debug/hidapi.lib
deleted file mode 100644 (file)
index dbf8080..0000000
Binary files a/hidapi/build-3a66d4e513/windows/x64/Debug/hidapi.lib and /dev/null differ
diff --git a/hidapi/build-3a66d4e513/windows/x64/Debug/hidapi.pdb b/hidapi/build-3a66d4e513/windows/x64/Debug/hidapi.pdb
deleted file mode 100644 (file)
index 290ff9d..0000000
Binary files a/hidapi/build-3a66d4e513/windows/x64/Debug/hidapi.pdb and /dev/null differ
diff --git a/hidapi/build-3a66d4e513/windows/x64/Release/hidapi.dll b/hidapi/build-3a66d4e513/windows/x64/Release/hidapi.dll
deleted file mode 100644 (file)
index 60bc0c3..0000000
Binary files a/hidapi/build-3a66d4e513/windows/x64/Release/hidapi.dll and /dev/null differ
diff --git a/hidapi/build-3a66d4e513/windows/x64/Release/hidapi.lib b/hidapi/build-3a66d4e513/windows/x64/Release/hidapi.lib
deleted file mode 100644 (file)
index 86c72df..0000000
Binary files a/hidapi/build-3a66d4e513/windows/x64/Release/hidapi.lib and /dev/null differ
diff --git a/hidapi/build-3a66d4e513/windows/x64/Release/hidapi.pdb b/hidapi/build-3a66d4e513/windows/x64/Release/hidapi.pdb
deleted file mode 100644 (file)
index 3d46923..0000000
Binary files a/hidapi/build-3a66d4e513/windows/x64/Release/hidapi.pdb and /dev/null differ