Skip to content

Commit

Permalink
Minor alterations
Browse files Browse the repository at this point in the history
  • Loading branch information
ehfd authored Sep 29, 2023
1 parent fb2fef0 commit a4b5e9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.example
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export GSTREAMER_PATH=/opt/gstreamer\n\
source /opt/gstreamer/gst-env\n\
export LD_PRELOAD=/usr/local/lib/selkies-js-interposer/joystick_interposer.so\n\
export SDL_JOYSTICK_DEVICE=/dev/input/js0\n\
sudo mkdir -p /dev/input\n\
sudo mkdir -pm755 /dev/input\n\
sudo touch /dev/input/{js0,js1,js2,js3}\n\
Xvfb -screen :0 8192x4096x24 +extension RANDR +extension GLX +extension MIT-SHM -nolisten tcp -noreset -shmem 2>&1 >/tmp/Xvfb.log &\n\
until [[ -S /tmp/.X11-unix/X0 ]]; do sleep 1; done && echo 'X Server is ready'\n\
Expand Down
6 changes: 3 additions & 3 deletions addons/js-interposer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

LD_PRELOAD library for interposing application calls to open a Linux joystick device and pass data via a unix domain socket.

This allows the selkies-gstreamer WebRTC interface to pass gamepad events over the Data Channel and translate them to joystick events without requiring access to /dev/input/js0 or depend kernel modules like uinput to emulate devices.
This allows the `selkies-gstreamer` WebRTC interface to pass gamepad events over `RTCDataChannel`, and translate them to joystick events without requiring access to /dev/input/js0 or depending on kernel modules including uinput to emulate devices.

## Compiling

Expand All @@ -12,7 +12,7 @@ gcc -shared -fPIC -o joystick_interposer.so joystick_interposer.c -ldl

## Testing

1. Start the python joystick emulator:
1. Start the Python joystick emulator:

```bash
python3 js-interposer-test.py
Expand All @@ -24,4 +24,4 @@ This creates a new unix domain socket at `/tmp/selkies_js0.sock` and simulates j

```bash
LD_PRELOAD=${PWD}/joystick_interposer.so jstest /dev/input/js0
```
```

0 comments on commit a4b5e9d

Please sign in to comment.