Steam controllers as Gamepads

Is there any good reason for Steam Controllers not being considered a GameController in SDL2?

While running some tests, that include opening the device as a SDL_Joystick and map the buttons myself. I was able to get all available input working, hence I ask:

why not Steam Controllers are identified as a GameController?

To show some info, the application output is:

INFO: main: 1 joysticks found
INFO: main: Not GameController 0: #ax: 4, #but: 21, #hat: 2, #ball: 0 -- 03000000de2800004211000011010000 -- Wireless Steam Controller
INFO: Joystick added
[0](000000,000000)(000000,000000)[000000][000000]oo000000000000000010000
INFO: Closing application
INFO: Bye.

The full of 0's line shows:

  • [joystick id]
  • (axis0, axis1)
  • (axis3, axis4)
  • [axis2]
  • [axis5]
  • o <-- is a hat, it changes to \/^v,.<> it depends on hat state (in this case there is 2 hats).
  • 00000... each button state, 0 not pressed, 1 pressed. (here I’m pressing the last button, right bumper).

Moreover, besides it reports 21 buttons, I could not find the last 4 buttons anywhere. And triggers are also mapped as hats (weird).

After read the SDL source code SDL/src/joystick/SDL_gamecontroller.c:1168 I found out, that a mapping is necessary to make a Joystick be handled as a GameController. Hence I made my own mapping. And now is working nicely.

I have 2 Steam controllers, one is identified as joystick (and I’m being able to map as a GameController), the other one is not even identified as a Joystick.

I don’t know why. Maybe the firmware.

Any hints?

From what I understand, Steam provides your game with the SteamController mappings created by the user at runtime, so users can have things mapped the way they want. Outside of Steam, who knows?

Maybe someone want to run a game without steam using a steam controller (it’s just a piece of hardware).

Did you ever reach a satisfactory point with this? I’ve just sent an early version of my game to a friend to test - he has a Steam Controller (I don’t), and my game (which is only using GameController for input at the moment) doesn’t see it at all.