-
-
Notifications
You must be signed in to change notification settings - Fork 54
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 Fixes for SDL, Wine, Retroarch and RPCS3 #173
base: main
Are you sure you want to change the base?
Conversation
de3c25e
to
b28e51f
Compare
b28e51f
to
64dfef9
Compare
c54628f
to
b0ec08c
Compare
@danisla Feel free to switch from Draft PR if you are ready. |
That is in order for the near future. I know the source of error. |
Ok maybe we’ll just leave it disabled for now and you can re-enable it the build steps later. |
Anyways, when you are ready, press "Ready for review" and I'll directly make necessary edits. |
I'm seeing a segfault during the entrypoint when running with the
It looks like the Moving this back to draft to fix the entrypoint issue. |
@danisla I am seeing that this issue might also be relevant, although separate. The concern I have with #171 is whether the below can be made more simple in any way; need a sufficient understanding of the websockets package. This is mostly redundant except def custom_response(self, status, custom_headers, body):
"""A wrapper indentical to https://github.com/python-websockets/websockets/blob/main/src/websockets/server.py#L482
but allows 'body' type to be either bytes or string.
"""
status = http.HTTPStatus(status)
headers = Headers(
[
("Date", email.utils.formatdate(usegmt=True)),
("Connection", "close"),
("Content-Length", str(len(body))),
("Content-Type", "text/plain; charset=utf-8"),
]
)
# overriding and appending headers if provided
for key, value in custom_headers:
if headers.get(key) is not None:
del headers[key]
headers[key] = value
# Expecting bytes, but if it's string then convert to bytes
if isinstance(body, str):
body = body.encode()
return Response(status.value, status.phrase, headers, body) |
This doesn't seem related to the joystick interposer function, so we'll solve it in the respective issue. |
Yeah, just for reference. |
@danisla For the purpose of documentation, what are the exhaustive interface (and/or driver) options that this interposer now supports? (e.g. joydev, udev/evdev, sdl1/2, hid, etc...) And can one use udev and sdl2 options here if one chooses so? https://docs.libretro.com/guides/input-controller-drivers/#linux |
Changes
open64
and makes socket non-blocking when added to anepoll
./dev/input/event*
joystick devices.SDL_JOYSTICK_DEVICE
workaround for SDL apps is no longer needed.Application Specific
Retroarch
To use with retroarch, edit your
retroarch.cfg
(at~/.config/retroarch/retroarch.cfg
) and set:RPCS3
Select
![Screenshot from 2025-02-07 00-08-58](https://private-user-images.githubusercontent.com/323725/410822217-fa9ef87f-f098-4366-b27e-73265286b5f9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1ODg2ODEsIm5iZiI6MTczOTU4ODM4MSwicGF0aCI6Ii8zMjM3MjUvNDEwODIyMjE3LWZhOWVmODdmLWYwOTgtNDM2Ni1iMjdlLTczMjY1Mjg2YjVmOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNVQwMjU5NDFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03MGQxNmFkNWM1M2YzZDc3YWJiNjkxMDJmNmE0MTNhMzk2YjFkMWMyMzg3Yzg3MzhiYzBiYTc2NTczMGE4ODMwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Vj8qW0SpgeSh_yY2miaQ04tNQtMlnS9g0Xy0K0_md6E)
SDL
as controller handler then selectSelkies Controller 1
from the device list.Wine
Run
![Screenshot from 2025-02-07 00-10-19](https://private-user-images.githubusercontent.com/323725/410822647-1db549e9-3945-4596-9230-2a4a840b83e0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1ODg2ODEsIm5iZiI6MTczOTU4ODM4MSwicGF0aCI6Ii8zMjM3MjUvNDEwODIyNjQ3LTFkYjU0OWU5LTM5NDUtNDU5Ni05MjMwLTJhNGE4NDBiODNlMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNVQwMjU5NDFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xOWY3N2FjNjI4YzgxYjE0YjI4NmM1NTZkZmM1MWE0NDY4YzdlNDdkNzc2MjYwMDAzYWJiZWFkZGM5ZmY3OTg4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.e_c3HcH9cdsUQPjshqeIUdErNstQspM9-OSTsc4-bkk)
wine control
and then open theGame Controllers
app to test joystick support.Testing
nvidia-egl-desktop:24.04
Dockerfile.egl.jstest
:Build and run:
gst-py-example:main-ubuntu24.04
Dockerfile.example.jstest
Build:
Run: