-
Notifications
You must be signed in to change notification settings - Fork 914
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
Provide support for Xbox Series X|S based on windows-rs #2506
Comments
Could you provide some more information about the platform? How is it supported by Rust (target info), links to how to use it in practice ( |
It's pretty much modified Windows based on the same win32 API (used to be UWP), it doesn't require compiler port unlike Switch or PlayStation 5. What you need is, generated target JSON file. Input is a bit different story. We will have to introduce gamepad support using standard xinput from Windows APIs From the tests, works perfectly fine with |
Hmm, we've long been working on a rewrite of the keyboard event handling, so maybe see the probably a bit outdated branch Whether or not that is the case, we could probably accept code to support it. It sounds like there is a lot of duplication with the normal Windows platform, and that this is a rather niche use-case, so perhaps it would be better to have it as a cargo feature? |
If compiler licensing team will agree on adding it as new target then it will be much easier than cargo feature. For now I have to dig more into getting device context because using plain win32 for xbox is wild guessing and testing since it's not documented. Microsoft only provides documented GDKX wrapper which is pre-compiled and window creation is single call in main function. For the time being, I will look into introducing gamepad support through xinput. |
Added simple gamepad API and it seems to work on xbox series devkit, but here is simple problem. For some reason, windows-rs have two different ways to provide gamepad support 🤦🏼♂️ One of them is, "Windows Gaming Input" |
Did some research on gamepad support on Windows and there are literally five different input libraries which can handle it... DirectInput (from 95 era), Xinput, Rawinput, Windows Gaming Input (WinRT) and GameInput (GDK). Last two ones seems to be prefered by Microsoft, while all the previous are deprecated, you can still use because of backwards compatibility. EDIT: Last two ones also requires focused window to work, unlike others |
@madsmtm There are some implementation details for gamepad support which should discuss. It will be HUGE change, WGI (Windows Gaming Input) will provide a lot of new features under e.g. |
@heavyrain266 hello there, appreciate your Xbox research efforts! Are there any updates on this topic? I am trying to run at least a simple rust UWP app on Xbox Series S and no luck so far.. The app runs on Windows though. |
I'm not working on anything related anymore nor have devkit access, can't help you unfortunatelly. |
After series of tests on console's devkit made by friend's studio, It's mainly possible to upstream Xbox as the new supported platform (NO CI)
Implementation is simple, mostly copy-paste windows code under
xbox
module which requires disabling GDI support in windows-rs and removal of related functions and some other stuff.NOTE: I cannot create Pull Request at the moment because I'm waiting for private devkit for my studio @eukaryote-interactive.
The text was updated successfully, but these errors were encountered: