Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alyrow opened this issue Apr 23, 2020 · 12 comments
Open

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

alyrow opened this issue Apr 23, 2020 · 12 comments

Comments

@alyrow
Copy link

alyrow commented Apr 23, 2020

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
Copy link
Owner

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
Copy link
Owner

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
Copy link
Author

alyrow commented Apr 23, 2020

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
Copy link
Owner

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
Copy link
Author

alyrow commented Apr 23, 2020

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
Copy link
Owner

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
Copy link
Author

alyrow commented Apr 24, 2020

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
Copy link

morvael commented Aug 30, 2021

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

@isXander
Copy link

isXander commented Apr 3, 2023

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

@electronstudio
Copy link
Owner

What OS and what controller are you using?

@isXander
Copy link

isXander commented Apr 4, 2023

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
Copy link

Juancb28 commented Aug 1, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants