From 081e23a8df17291b121a0d1b20c614b0d2226ba8 Mon Sep 17 00:00:00 2001 From: Tovarichtch Date: Fri, 8 Nov 2024 14:42:45 -0500 Subject: [PATCH] . --- .../controllers/guns/openfire-guns/99-openfire-guns.rules | 1 - .../controllers/guns/openfire-guns/virtual-openfire-add | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/package/batocera/controllers/guns/openfire-guns/99-openfire-guns.rules b/package/batocera/controllers/guns/openfire-guns/99-openfire-guns.rules index e6991f7918..01d8fe77a0 100644 --- a/package/batocera/controllers/guns/openfire-guns/99-openfire-guns.rules +++ b/package/batocera/controllers/guns/openfire-guns/99-openfire-guns.rules @@ -2,7 +2,6 @@ # Keyboard, Mouse and Gamepad SUBSYSTEM=="input", ACTION=="add", ATTRS{name}=="OpenFIRE FIRECon Keyboard", ENV{ID_INPUT_KEYBOARD}="0", ENV{ID_INPUT_KEY}="0", RUN+="/usr/bin/virtual-openfire-add" SUBSYSTEM=="input", ACTION=="add", ATTRS{name}=="OpenFIRE FIRECon Mouse", ENV{ID_INPUT_MOUSE}="0", RUN+="/usr/bin/virtual-openfire-add" -SUBSYSTEM=="input", ACTION=="add", ATTRS{name}=="OpenFIRE FIRECon", ENV{ID_INPUT_JOYSTICK}="0", ENV{ID_INPUT_KEY}="0", RUN+="/usr/bin/virtual-openfire-add" # Virtual Light Gun SUBSYSTEM=="input", ACTION=="add", ATTRS{name}=="OpenFIRE light gun", MODE="0666", ENV{ID_INPUT_JOYSTICK}="0", ENV{ID_INPUT_KEYBOARD}="0", ENV{ID_INPUT_KEY}="0", ENV{ID_INPUT_MOUSE}="1", ENV{ID_INPUT_GUN}="1" diff --git a/package/batocera/controllers/guns/openfire-guns/virtual-openfire-add b/package/batocera/controllers/guns/openfire-guns/virtual-openfire-add index c6daa4e820..f425381190 100644 --- a/package/batocera/controllers/guns/openfire-guns/virtual-openfire-add +++ b/package/batocera/controllers/guns/openfire-guns/virtual-openfire-add @@ -38,11 +38,10 @@ checkRunningPIDAndExit1 CHILDREN=$(evsieve-helper children "${PARENTHASH}" input usb) NDEVS=$(echo "${CHILDREN}" | wc -l) -if test "${NDEVS}" = 3 +if test "${NDEVS}" = 2 then DEV1=$(echo "${CHILDREN}" | head -1 | cut -f 1) DEV2=$(echo "${CHILDREN}" | head -2 | tail -1 | cut -f 1) - DEV3=$(echo "${CHILDREN}" | head -3 | tail -1 | cut -f 1) # Based on the enclosed instruction book from official Github # @@ -58,7 +57,7 @@ then # D-pad left : KEY_LEFT # D-pad right : KEY_RIGHT - nohup evsieve --input "${DEV1}" "${DEV2}" "${DEV3}" persist=exit --map yield btn:middle btn:2 --map yield btn:side btn:right --map yield key:1 btn:middle --map yield key:5 btn:1 --map yield key:up btn:5 --map yield key:down btn:6 --map yield key:left btn:7 --map yield key:right btn:8 --output name="OpenFIRE light gun" >/dev/null 2>"${LOGFILE}" & + nohup evsieve --input "${DEV1}" "${DEV2}" persist=exit --map yield btn:middle btn:2 --map yield btn:side btn:right --map yield key:1 btn:middle --map yield key:5 btn:1 --map yield key:up btn:5 --map yield key:down btn:6 --map yield key:left btn:7 --map yield key:right btn:8 --output name="OpenFIRE light gun" >/dev/null 2>"${LOGFILE}" & echo $! > "${PIDFILE}" else unlockAndExit 1