Guest User

Untitled

a guest
Jan 29th, 2016
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.46 KB | None | 0 0
  1. diff -ru '--exclude=*.txt' hidapi-0.7.99.post12/hidapi/windows/hid.c hidapi-0.7.99.post12-mod/hidapi/windows/hid.c
  2. --- hidapi-0.7.99.post12/hidapi/windows/hid.c   2015-09-30 01:23:20.000000000 +0200
  3. +++ hidapi-0.7.99.post12-mod/hidapi/windows/hid.c   2016-01-29 22:37:15.629671300 +0100
  4. @@ -195,7 +195,7 @@
  5.  #ifndef HIDAPI_USE_DDK
  6.  static int lookup_functions()
  7.  {
  8. -   lib_handle = LoadLibraryA("hid.dll");
  9. +   lib_handle = LoadLibraryExA(".\\hid.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
  10.     if (lib_handle) {
  11.  #define RESOLVE(x) x = (x##_)GetProcAddress(lib_handle, #x); if (!x) return -1;
  12.         RESOLVE(HidD_GetAttributes);
  13. @@ -222,9 +222,7 @@
  14.  {
  15.     HANDLE handle;
  16.     DWORD desired_access = (enumerate)? 0: (GENERIC_WRITE | GENERIC_READ);
  17. -   DWORD share_mode = (enumerate)?
  18. -                         FILE_SHARE_READ|FILE_SHARE_WRITE:
  19. -                         FILE_SHARE_READ;
  20. +   DWORD share_mode = FILE_SHARE_READ|FILE_SHARE_WRITE;
  21.  
  22.     handle = CreateFileA(path,
  23.         desired_access,
  24. diff -ru '--exclude=*.txt' hidapi-0.7.99.post12/setup.py hidapi-0.7.99.post12-mod/setup.py
  25. --- hidapi-0.7.99.post12/setup.py   2016-01-19 22:32:54.000000000 +0100
  26. +++ hidapi-0.7.99.post12-mod/setup.py   2016-01-29 21:55:23.049329900 +0100
  27. @@ -51,7 +51,7 @@
  28.          )
  29.      ]
  30.  
  31. -if sys.platform.startswith('win'):
  32. +if sys.platform.startswith('win') or sys.platform.startswith('cygwin'):
  33.      modules = [
  34.          Extension('hid',
  35.              sources = ['hid.pyx', 'chid.pxd', hidapi_src('windows')],
Advertisement
Add Comment
Please, Sign In to add comment