No meaningful joystick names since 2.0.9? (Windows 10)


#1

Before 2.0.9, SDL_JoystickName would return a meaningful brand name for my game controllers, such as “Xbox One Controller” and “Mocute”. Now I just get “X-Input” and “Gamepad”. Am I missing something?


#2

Also since 2.0.9, SDL_GameControllerOpen is producing a “Unexpected controller element” every time, even though it returns non-NULL.


#3

I filed a bug here:

https://bugzilla.libsdl.org/show_bug.cgi?id=4430

…feel free to CC yourself on it!


#4

Is this also related to that new HID input code?

TBH, so far that code doesn’t seem very mature…


#5

Yes, I believe this happened when the HID stuff was merged.

I agree Daniel. I wasn’t going to say anything before, but the new HID stuff has a lot more bugs than the previous implementation. Before, it worked well enough and I was able to by-pass the old bugs. Now, it’s broken on Android - I can’t use it.


#6

The Android implementation is shipping in the Steam Link app and seems to work well there. What bugs are you running into?

The HIDAPI controller code should only trigger for a certain known set of controllers, and should fall back to the normal code path for everything else. Is that not happening in your case? Can you debug and find out where those simplistic names are coming from?


#7

I’m testing against about 15 different game controllers and getting some odd results.

On Android I was getting controllers not being seen at all, some controllers only producing axis events, and app exiting prematurely when controllers were unplugged and plugged; none of this happened on 2.0.8. I need to revisit my Android build with the latest HG build and give a more detailed report.

I’ll do some digging and debug the Windows build and see what’s up with the names. I don’t really know how the HIDAPI works, and I didn’t know it runs parallel to SDL’s existing input stuff - that’d explain the large jump in file size :wink: .