Skip to content
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

Joystick Interposer cannot be detected as a controller device in Steam Proton/Wine and RPCS3 #168

Open
Mengkzhaoyun opened this issue Dec 5, 2024 · 5 comments
Assignees
Labels
bug Something isn't working help wanted External contribution is required interface OS input, display, or audio interfaces

Comments

@Mengkzhaoyun
Copy link

Mengkzhaoyun commented Dec 5, 2024

the linux system joystick can detect gamepad
yuzu games can correct use gamepad , play totk is wonderful.
image

but the steam can not detect gamepad , so many windows games , can not play with gamepad.
Is there a way to set some options make steam detect the gamepad?

selkies-gstreamer 1.6.0
use EGL Desktop in Docker

@Mengkzhaoyun Mengkzhaoyun added the enhancement New feature or request label Dec 5, 2024
@Mengkzhaoyun
Copy link
Author

the env set with lutris
export LD_PRELOAD='/usr/$LIB/selkies_joystick_interposer.so'
export SDL_JOYSTICK_DEVICE=/dev/input/js0
image

rpcs3 also can not detect the gamepad also with sdl mode.
1733388386467

@ehfd
Copy link
Member

ehfd commented Dec 6, 2024

https://github.com/loochek/wine-vpad

Try installing the above to the Proton/Wine prefix (protontricks -c "wine PATH/TO/PROGRAM" APP_ID). More information at #55 (comment). Might have to reopen #55.

@Mengkzhaoyun
Copy link
Author

Thanks for your guidance! I've developed a gamepad controller in Go using uinput, replacing the LD_PRELOAD solution. Now it works with both RPCS3 and Steam.
Because I'm using uinput, deployment requires additional privileges like adding the SYS_RAWIO capability and mounting the /dev/input directory. Uinput is really great, but it has some significant conflicts with our current solution. I can open-source the code if you're interested.

@ehfd
Copy link
Member

ehfd commented Dec 14, 2024

We have previously replaced the uinput method in #95 with the LD_PRELOAD solution, closing #55 in the process.
We are reopening this issue because we had assumed that the LD_PRELOAD solution could replace all permutations of the uinput method.

CC @danisla

@ehfd ehfd reopened this Dec 14, 2024
@ehfd ehfd changed the title Steam can not detect controller device Joystick Interposer cannot be detected as a controller device in Steam and RPCS3 Dec 14, 2024
@ehfd ehfd added bug Something isn't working help wanted External contribution is required transport Underlying media or data transport protocols web Web components including gst-web interface OS input, display, or audio interfaces and removed enhancement New feature or request transport Underlying media or data transport protocols web Web components including gst-web labels Dec 14, 2024
@ehfd ehfd changed the title Joystick Interposer cannot be detected as a controller device in Steam and RPCS3 Joystick Interposer cannot be detected as a controller device in Steam Proton/Wine and RPCS3 Dec 24, 2024
@danisla
Copy link
Member

danisla commented Jan 21, 2025

The LD_PRELOAD interposer library works by detecting open and ioctl syscalls and re-routing joystick events through a connected unix domain socket.
If the application isn't using direct /dev/input/jsX open calls it won't work.

Adding SDL and evdev interposition could make more applications, like RPCS3 work.
Hoping to find some time to work on this a bit more.

In the meantime, there are some improvements in #173 that fixes some other issues with applications that use epoll to get joystick input, namely Retroarch and possibly others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted External contribution is required interface OS input, display, or audio interfaces
Projects
None yet
Development

No branches or pull requests

3 participants