electronstudio / sdl2gdx

Java wrapper for SDL and LibGDX controller API
Other
74 stars 10 forks source link

[sdl2gdx 1.0.4] Failed loading libusb-1.0.dll #22

Open alyrow opened 4 years ago

alyrow commented 4 years ago

Hello, Well the flashing window is back, but I know how to fix that now. But I have observed that in the traceback :

EXTRACTED LOC C:\Users\____\AppData\Local\Temp\5687545216180750193.tmp
Joystick 0: XINPUT:Xbox 360 Controller
joystick org.libsdl.SDL_Joystick@917bcaf controller org.libsdl.SDL_GameController@916b7df
connected SDL GameController ShanWan PS3/PC Wired GamePad instance:0  guid: 030000005e0400008e02000000007801 v 0
NATIVE METHOD: loading from  "C:\Users\____\AppData\Local\Temp\5687545216180750193.tmp"
             result 64  Failed loading libusb-1.0.dll: The specified module could not be found

Is it normal ?

Best regards.

electronstudio commented 4 years ago

According the docs, SDL on Windows should be using hid.dll. libusb is only used on Linux. libusb-1.0.dll is not linked in the binary so I guess it is attempting to load it dynamically. Could be because I had it installed in the build environment, or could be it just tries it in all cases.

Does the controller work?

Does this error cause a crash?

Does this error repeat more than once?

What happens if you supply libusb-1.0.dll in the current directory?

electronstudio commented 4 years ago

It seems to be something that was changed in SDL 2.0.12. They went from disabling libusb on windows to enabling it but loading it dynamically. So I would guess things will still work without it, but perhaps work better if you supply it. If that's not the case then I could attempt to disable it completely.

alyrow commented 4 years ago

Yes the controller works, no crash but this occurs only when I close the game. Put libusb-1.0.dll only makes it disappear.

(Off topic : the flashing window is back... Even the zip version doesn't fix...)

electronstudio commented 4 years ago

In that case I don't think it's a problem. Possibly I should add libusb to the distribution if SDL if using it to improve controller detection.

If you can send me a version of the project with the flashing window I will take a look at it.

alyrow commented 4 years ago

Thanks : this is the zip. The flash occurs randomly. Sorry, texts are not in english but it is not problematic. If you want to use the controller to browse the cards, you need to press XBox/PS button then A/X then use buttons indiqued on cards. (Keyboard doesn't work for the moment)

electronstudio commented 4 years ago

Here is how it looks for me: https://www.youtube.com/watch?v=qkpCOc290-I&feature=youtu.be

It doesn't flash. Can you send me a video of it flashing?

alyrow commented 4 years ago

Strange, it blinks for me : https://youtu.be/jfLtk3zjRlk

But with Github action, I have made a jar and this jar version doesn't flash.

morvael commented 3 years ago

Even placing libusb-1.0.dll in java.library.path doesn't make the message go away.

isXander commented 1 year ago

Cannot get joystick rumble working. Only difference between running directly in C (which works) vs in java is this error.

electronstudio commented 1 year ago

What OS and what controller are you using?

isXander commented 1 year ago

Fiddling with SDL hints fixed my issue. The SDL test had a window open which was probably the problem as I hadn't set SDL background hint (I was not using controller manager)

Juancb28 commented 1 month ago

result 550 Failed loading libusb-1.0.dll: The specified module could not be found.

I'm using W11 with x64 and I did all the steps that were told in this page and I can't fix it