mirror of
https://github.com/RPCS3/hidapi.git
synced 2024-11-30 13:30:24 +00:00
c7f35c3a46
Multiple users have reported the need to pass SHARE_MODE_READ|SHARE_MODE_WRITE to CreateFileA(). It seems that some devices will not open at all if sharing is not requested. This commit makes it so that CreateFileA() will be tried twice, the first time with sharing mode OFF (passing 0x0 to the ShareMode parameter of CreateFileA()), and if that fails, it will try to open the device with share mode ON (passing the above SHARE_MODE_ flags to the ShareMode parameter of CreateFileA()). This will have the following effects: For normal devices: Devices will open as normal. Only one instance can be opened at a time. For devices which require share mode to be on: Devices will now open (they would not open at all before). Multiple instances can be opened. This is less than desirable, but the alternative is that these devices don't open at all. |
||
---|---|---|
.. | ||
ddk_build | ||
.gitignore | ||
hid.cpp | ||
hidapi.sln | ||
hidapi.vcproj | ||
hidtest.vcproj | ||
Makefile | ||
Makefile.mingw |