Hi there,
I don’t have a Steam Deck dev-kit, but my game does run on that platform. However, I can’t seem to find a way to (in runtime) distinguish if the game is currently running on Linux or the Steam Deck. Usually one would check Application.platform, but even in 2021.3, there is no enum value for the SteamDeck…
You could also place an option in your user options section for whatever reason you need to know if it’s on Steam Deck. I’m guessing because you want to alter your UI for a small screen. You could add a “Small Screen UI” checkbox in your graphics options which would be useful for anyone who is running your software on a small screen, not just Steam Deck users. Autodetecting Steamdeck can set the default value.
According to Steam’s readme.txt that comes with the Steamworks API:
v1.52 14th September 2021
ISteamUtils
* Added IsSteamRunningOnSteamDeck - Can be used to optimize the experience of the game on Steam Deck, such as scaling the UI appropriately, applying performance related settings, etc.
Right now my build for Linux is working perfectly on the Steam Deck, flawlessly even, all that’s left is to add the inputs using the Steam API. ¯_(ツ)_/¯
The only reason I want to do it is because they map the controls to keys and it looks bad if they press the dpad and it says they pressed the ‘P’ key. Plus I check for ‘P’ key in my code to ‘Pause’ but don’t want to if it is really the dpad. The mix of keyboard/mouse, controller and touch interfaces just make set up complex.