Skip to content

Commit 64dfef9

Browse files
committed
update startup scripts and docs to support evdev joystick interposer
1 parent 81f10c4 commit 64dfef9

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

.devcontainer/features/desktop-selkies/src/start-selkies.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ sudo chmod 777 /dev/input/js*
4444
if [ -e "/usr/lib/x86_64-linux-gnu/selkies_joystick_interposer.so" ]; then
4545
export SELKIES_INTERPOSER='/usr/$LIB/selkies_joystick_interposer.so'
4646
export LD_PRELOAD="${SELKIES_INTERPOSER}${LD_PRELOAD:+:${LD_PRELOAD}}"
47-
export SDL_JOYSTICK_DEVICE=/dev/input/js0
4847
fi
4948

5049
# Start desktop environment

addons/example/entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ until [ -d "${XDG_RUNTIME_DIR}" ]; do sleep 0.5; done
1212
# Configure joystick interposer
1313
export SELKIES_INTERPOSER='/usr/$LIB/selkies_joystick_interposer.so'
1414
export LD_PRELOAD="${SELKIES_INTERPOSER}${LD_PRELOAD:+:${LD_PRELOAD}}"
15-
export SDL_JOYSTICK_DEVICE=/dev/input/js0
1615
mkdir -pm1777 /dev/input || sudo-root mkdir -pm1777 /dev/input || echo 'Failed to create joystick interposer directory'
1716
touch /dev/input/js0 /dev/input/js1 /dev/input/js2 /dev/input/js3 || sudo-root touch /dev/input/js0 /dev/input/js1 /dev/input/js2 /dev/input/js3 || echo 'Failed to create joystick interposer devices'
18-
chmod 777 /dev/input/js* || sudo-root chmod 777 /dev/input/js* || echo 'Failed to change permission for joystick interposer devices'
17+
touch /dev/input/event1000 /dev/input/event1001 /dev/input/event1002 /dev/input/event1003 || sudo-root touch /dev/input/event1000 /dev/input/event1001 /dev/input/event1002 /dev/input/event1003 || echo 'Failed to create joystick interposer devices'
18+
chmod 777 /dev/input/js* /dev/input/event* || sudo-root chmod 777 /dev/input/js* /dev/input/event* || echo 'Failed to change permission for joystick interposer devices'
1919

2020
# Set default display
2121
export DISPLAY="${DISPLAY:-:20}"

addons/example/selkies-gstreamer-entrypoint.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ until [ -d "${XDG_RUNTIME_DIR}" ]; do sleep 0.5; done
1212
# Configure joystick interposer
1313
export SELKIES_INTERPOSER='/usr/$LIB/selkies_joystick_interposer.so'
1414
export LD_PRELOAD="${SELKIES_INTERPOSER}${LD_PRELOAD:+:${LD_PRELOAD}}"
15-
export SDL_JOYSTICK_DEVICE=/dev/input/js0
1615

1716
# Set default display
1817
export DISPLAY="${DISPLAY:-:20}"

docs/component.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,15 @@ The following paths are required to exist for the Joystick Interposer to pass th
186186
```bash
187187
sudo mkdir -pm1777 /dev/input
188188
sudo touch /dev/input/js0 /dev/input/js1 /dev/input/js2 /dev/input/js3
189-
sudo chmod 777 /dev/input/js*
189+
sudo touch /dev/input/event1000 /dev/input/event1001 /dev/input/event1002 /dev/input/event1003
190+
sudo chmod 777 /dev/input/js* /dev/input/event*
190191
```
191192

192193
The following environment variables are required to be set in the environment each application is being run in to receive the joystick/gamepad input.
193194

194195
```bash
195196
export SELKIES_INTERPOSER='/usr/$LIB/selkies_joystick_interposer.so'
196197
export LD_PRELOAD="${SELKIES_INTERPOSER}${LD_PRELOAD:+:${LD_PRELOAD}}"
197-
export SDL_JOYSTICK_DEVICE=/dev/input/js0
198198
```
199199

200200
You can replace `/usr/$LIB/selkies_joystick_interposer.so` with any non-root path of your choice if using the `.tar.gz` tarball.

docs/start.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ export DISPLAY="${DISPLAY:-:0}"
185185
# Configure the Joystick Interposer
186186
export SELKIES_INTERPOSER='/usr/$LIB/selkies_joystick_interposer.so'
187187
export LD_PRELOAD="${SELKIES_INTERPOSER}${LD_PRELOAD:+:${LD_PRELOAD}}"
188-
export SDL_JOYSTICK_DEVICE=/dev/input/js0
189188
sudo mkdir -pm1777 /dev/input
190189
sudo touch /dev/input/js0 /dev/input/js1 /dev/input/js2 /dev/input/js3
191-
sudo chmod 777 /dev/input/js*
190+
sudo touch /dev/input/event1000 /dev/input/event1001 /dev/input/event1002 /dev/input/event1003
191+
sudo chmod 777 /dev/input/js* /dev/input/event*
192192

193193
# Commented sections are optional but may be mandatory based on setup
194194

0 commit comments

Comments
 (0)