-
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect when Steam Deck is Docked? #135
Comments
Not sure about this. steamworks.js wraps around https://github.com/Noxime/steamworks-rs which has documentation here https://docs.rs/steamworks/latest/steamworks/ steamworks-rs wraps around the Steamworks C++ API documented here https://partner.steamgames.com/doc/api Questions like the one you're asking generally have an API in That's where you'll find the But I think it might be challenging to test this using steamworks.js, because … and so it's not available in steamworks.js, either. So, the first step to investigate this might be to try using the Steamworks C++ API directly for a basic example game you author yourself, to see if you can find any way to use that to detect docking. If you knew for sure that this does work properly in C++, well, in the past, I've filed PRs on steamworks-rs to add C++ features, get the PR merged, and then file a PR on steamworks.js to expose that functionality to Electron. It's a lot of work, but, it's open source, so you might not have much luck waiting for someone else to implement Another related idea would be to post on (or search) the Steamworks Developer forum https://steamcommunity.com/groups/steamworks and ask how to use the C++ API to detect docking. If they say "yeah, just use |
Interesting idea! I'm curious if that would work. I ended up making it a setting in Options to force it one way or another as well as an Auto Detect method that basically works by checking if a 2nd Controller is being actively used (I use navigator.getGamepads() at the moment and not the Steam Input stuff in the API) for a "Steam Deck" player. So if a Steam Deck is being used & a 2nd Controller actively used, then switches the display resolution and treats the 2nd Controller as Controller 1 (since Steam Deck itself is normally controller 1). And of course switch it back to Steam Deck view (1280 x 800) if the Steam Deck Controller is used again. Not perfect, but it works and is a working solution for now. |
Maybe this is a dumb question, but has anyone who has been testing on Steam Deck, figured out a way to detect when your game is not only running on a Steam Deck, but is docked (aka showing game on TV/monitor/etc).
I can detect if it's a Steam Deck playing the game, but I sadly can't figure out how to determine if docked and displaying on a larger screen/etc. As I need to change a few things in the game.
I have tried to check for Elecron JS call of "screen.getAllDisplays()", but only gives me back the original Steam Deck screen (1280 x 800) and not any connected screens sadly.
Thanks in advance
The text was updated successfully, but these errors were encountered: