nyholku / purejavahidapi

Other
122 stars 69 forks source link

Fixed JNA 5.x and detection HID for Windows (with source code) #62

Open ivanooi opened 5 years ago

ivanooi commented 5 years ago

Hi, I do not have github setup... but I had made a few changes on it.

I will attach the source code and compiled purejavahidapi.jar file here ... purejavahidapi.windows.zip

purejavahidapi\windows\SetupApiLibrary.java purejavahidapi\windows\WinDef.java purejavahidapi\windows\WindowsBackend.java

SetupApiLibrary.java and WinDef.java changes : Pointer.SIZE to com.sun.jna.Native.POINTER_SIZE

WindowsBackend.java changes : if (drivername != null ) { to if ("HIDClass".equals(drivername)) {

purejavahidapi.zip

nyholku commented 5 years ago

Thanks, about the "if (drivername != null ) { toif ("HIDClass".equals(drivername))" , after a quick glans it looks to me that is already in the code. The first one makes sense of course.

ivanooi commented 5 years ago

oopss! my bad, should in this way :

if ("HIDClass".equals(drivername)) { to if (drivername != null ) {

:-P