SDL and Steam Input?

I have a small game that I’d like to publish on Steam.

This is my first time doing anything with Steam and the only Steam API I was planning to use is Steam Input for gamepad support.

Is Steam Input supported by SDL?

And if yes, what do I need to do to implement Steam Input?

(Edit) I guess what I mean is, is there a way to use SDL2 to read controllers attached via Steam?
Or would I simply have to change the controller code to use Steam Input API?

Kind regards
Jacob

If you set your game to use a gamepad configuration in the Steam Input section of the Steamworks settings, then Steam will automatically translate the Steam Controller input into conventional gamepad input that SDL understands.

If you use the more advanced features of Steam Input, like actions and so forth, then you should switch entirely to using Steam Input and not worry about using SDL’s controller support.

Thanks for your reply.

Does this mean I just have to include/initialize SteamWorks in my game code?

Like I said I’ve never done anything with Steam before.
I don’t know what is the minimal code change needed?

Kind regards
Jacob

For the first option, no, Steam takes care of emulating gamepad input as needed behind the scenes, you don’t need to do anything.

For the second option, you’re using the Steam API directly, so yes, you would need to include the SDK and initialize it to use the API functions.

I don’t understand how that would be possible?

Using a simple test app like jstest it just lists my gamepad the same when Steam is running and when it’s not.
How would SDL know the difference?

Kind regards
Jacob