Comments (6)
In searching for a nice way to detect all gamepads, I came across RPCS3's implementation for finding all joystick devices; they have similar implementations of this for all kinds of devices. We'll probably want to take a similar approach for finding relevant gamepads and then use just the first one initially.
from xrlinuxdriver.
I have this working at this point for a PS4 controller, but my goal has been to use this with the Steam Deck and there's something odd about how the Steam Deck's built-in controller hardware is represented, as I'm not seeing its /dev/input
device produce any events. I've been troubleshooting and debugging this Steam Deck issue for a good week and still haven't solved it.
from xrlinuxdriver.
It seems like Steam Deck disables their controller output when not in a game or gaming mode, so that took a while to figure out. I've got the most recent implementation of this pushed to the device_mirroring branch. There's one TODO in there, and I think it's important to have a way for users to disable controller mirroring before pushing this to main.
from xrlinuxdriver.
One other important note is that our virtual controller changes depending on what device it's mirroring (or if there's no device mirroring), but Steam stores controller configurations under the assumption that setup is one-and-done. So we'll either need to make our device look like a different device every time it mirrors a different device (or none), or have it reach out and remove steam controller configs whenever it's run.
from xrlinuxdriver.
I've made a ton of progress on this issue and I have it working for Steam Deck sometimes as it seems like Steam Deck does a lot of "grab"bing and manipulating the /dev/input
fds as you switch between desktop, gaming mode, actual games, and reordering controllers. I could continue to dial it in, but the PS4 mirroring behavior has actually taken a dive as I've improved the code to behave as a better mirror... as it looks to the Deck like two controllers are providing navigation input to the Gaming Mode UI at the same time. In order words, each attempt to move around the UI produces two movements in the same direction.
In the process of banging my head against this I've come across JoyShockMapper which doesn't necessarily solve all my problems but could simplify my implementation by: 1) not requiring that I create a virtual controller as it maps to keyboard/mouse and 2) not needing to work so closely to the libevdev library and reinvent the wheel. It would also allow me to use the glasses movement as actual IMU input, like gyro, rather than emulating joystick movement, so it would solve that problem for me as I was going to have to figure out a way to trick Steam into believing my virtual controller is a supported device type that has gyro, which so far has eluded me.
from xrlinuxdriver.
After a lot of thought, I'm actually closing this in favor of moving away from a virtual gamepad and just switching to a virtual mouse. This allows for automatic combination of headset movement with game controllers without the need for my hacky device mirroring attempts. It'll also have more universal support, so Steam Deck will just work and be able to combine input with a controller much more easily.
These changes have already been made in this pull request.
from xrlinuxdriver.
Related Issues (20)
- Driver loading without issue but not moving mouse cursor HOT 7
- [Discussion] Large virtual desktop in linux/wayland with head tracking HOT 13
- When will air2 be updated? HOT 1
- Support "travel-mode" for Steam Deck uses
- Would you be interested in helping us? HOT 1
- Air2 Pro HOT 7
- Alternative joy stick mode HOT 4
- NixOS support - Detecting XR Hardware But Not Creating or Modifying Inputs HOT 11
- Deadzone Setting for High Sensitivity
- Unable to update submodules HOT 3
- UA_API_SECRET missing error HOT 2
- Ability to stop driver HOT 1
- Inverted Roll HOT 2
- Adding single and double click support HOT 2
- Feature Request: Button Combo for Re-center / Re-calibrate
- Support for Xreal Light glasses HOT 2
- Request Support for 120hz mode using Xreal Air HOT 2
- display frames via usb-c HOT 1
- Udev rules HOT 11
- Strange SBS mode - Viture One
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xrlinuxdriver.