Noxime / steamworks-rs

Rust bindings to the SteamWorks SDK
Apache License 2.0
308 stars 106 forks source link

Missing a lot of Steam Input bindings #144

Open OvermindDL1 opened 10 months ago

OvermindDL1 commented 10 months ago

Following along with the SteamInput docs starting with https://partner.steamgames.com/doc/features/steam_controller/getting_started_for_devs going on to https://partner.steamgames.com/doc/api/ISteamInput and others and finding that many of the functions are missing from Input<Manager> including, but not limited to, getting origin data, glyph data, remote play session ID from input ID, vibration, haptics, etc. How are we intended to access these? Is there an extension trait for Input somewhere that I'm failing in finding? The version of steamworks-rs mapping to the steamworks SDK seems to be 1.54 that should have the functions in the steamworks docs above?

In addition it looks like the MSRV is modern enough to support some safer functionality, like sized arrays and so forth of the things I've been accessing so far? How open are you to API change PR's that use modern rust features?

OvermindDL1 commented 10 months ago

Interestingly, STEAM_INPUT_HANDLE_ALL_CONTROLLERS is also missing? Wonder how bindgen missed that, is it missing from the C flat source?

kristoff3r commented 10 months ago

Following along with the SteamInput docs starting with https://partner.steamgames.com/doc/features/steam_controller/getting_started_for_devs going on to https://partner.steamgames.com/doc/api/ISteamInput and others and finding that many of the functions are missing from Input<Manager> including, but not limited to, getting origin data, glyph data, remote play session ID from input ID, vibration, haptics, etc. How are we intended to access these? Is there an extension trait for Input somewhere that I'm failing in finding? The version of steamworks-rs mapping to the steamworks SDK seems to be 1.54 that should have the functions in the steamworks docs above?

While steamworks-sys should have basically the entire API, the safe bindings only have the things that people have needed and contributed in the past, so lots of stuff is missing. Feel free to open PRs or issues for anything that's missing.

In addition it looks like the MSRV is modern enough to support some safer functionality, like sized arrays and so forth of the things I've been accessing so far? How open are you to API change PR's that use modern rust features?

I'd be happy to review and merge stuff like that. I haven't been involved in this project for very long so I don't know if there is a policy or expectation for a certain MSRV, but I'd be in favor of raising it as well if it allows us to make a better / safer API.

OvermindDL1 commented 10 months ago

the safe bindings only have the things that people have needed and contributed in the past, so lots of stuff is missing. Feel free to open PRs or issues for anything that's missing.

Ah awesome, surprising that no one has needed the origin information yet (are they just not displaying the bound key information?).

but I'd be in favor of raising it as well if it allows us to make a better / safer API.

Good to know, thanks much!