@@ -197,20 +197,24 @@ if [ "$proot_updated" = true ]; then
197
197
[ -f "$HOME/.bashrc" ] && chown abc:abc "$HOME/.bashrc"
198
198
fi
199
199
200
- # set env based on vars
201
- if [[ -z ${NO_GAMEPAD+x} ]]; then
202
- printf "/usr/lib/selkies_joystick_interposer.so:/opt/lib/libudev.so.1.0.0-fake" > /run/s6/container_environment/LD_PRELOAD
203
- fi
204
-
205
- # js folder setup
200
+ # js setup
206
201
mkdir -pm1777 /dev/input
207
202
touch /tmp/selkies_js.log
208
- mknod /dev/input/js0 c 13 0
209
- mknod /dev/input/js1 c 13 1
210
- mknod /dev/input/js2 c 13 2
211
- mknod /dev/input/js3 c 13 3
212
- mknod /dev/input/event1000 c 13 1064
213
- mknod /dev/input/event1001 c 13 1065
214
- mknod /dev/input/event1002 c 13 1066
215
- mknod /dev/input/event1003 c 13 1067
216
- chmod 777 /dev/input/js* /dev/input/event* /tmp/selkies*
203
+ chmod 777 /tmp/selkies*
204
+ if [[ -z ${NO_GAMEPAD+x} ]] && mknod /dev/input/js0 c 13 0; then
205
+ printf "/usr/lib/selkies_joystick_interposer.so:/opt/lib/libudev.so.1.0.0-fake" > /run/s6/container_environment/LD_PRELOAD
206
+ mknod /dev/input/js1 c 13 1
207
+ mknod /dev/input/js2 c 13 2
208
+ mknod /dev/input/js3 c 13 3
209
+ mknod /dev/input/event1000 c 13 1064
210
+ mknod /dev/input/event1001 c 13 1065
211
+ mknod /dev/input/event1002 c 13 1066
212
+ mknod /dev/input/event1003 c 13 1067
213
+ chmod 777 /dev/input/js* /dev/input/event*
214
+ else
215
+ printf "false" > /run/s6/container_environment/SELKIES_UI_SIDEBAR_SHOW_GAMEPADS
216
+ printf "false" > /run/s6/container_environment/SELKIES_GAMEPAD_ENABLED
217
+ printf "false" > /run/s6/container_environment/SELKIES_ENABLE_PLAYER2
218
+ printf "false" > /run/s6/container_environment/SELKIES_ENABLE_PLAYER3
219
+ printf "false" > /run/s6/container_environment/SELKIES_ENABLE_PLAYER3
220
+ fi
0 commit comments