Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
Update mpv_sense
Browse files Browse the repository at this point in the history
Add && after ${DEBUG}
  • Loading branch information
plampix authored Mar 25, 2024
1 parent 1238415 commit 3cf88aa
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/multimedia/mpv/scripts/mpv_sense
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ PAUSE_EVENT='*(BTN_SOUTH), value 1'
CHANGE_AUDIO_EVENT='*(BTN_EAST), value 1'
CHANGE_SUB_EVENT='*(BTN_WEST), value 1'
SHOW_OSD_EVENT='*(BTN_NORTH), value 1'
BACK_5S_DPAD_EVENT='*(DPAD_LEFT), value 1'
BACK_5S_DPAD_EVENT='*DPAD_LEFT), value 1'
BACK_5S_HAT_EVENT='*(ABS_HAT0X), value -1*'
SKIP_5S_DPAD_EVENT='*(DPAD_RIGHT), value 1'
SKIP_5S_DPAD_EVENT='*DPAD_RIGHT), value 1'
SKIP_5S_HAT_EVENT='*(ABS_HAT0X), value 1*'
BACK_60S_DPAD_EVENT='*(DPAD_DOWN), value 1'
BACK_60S_DPAD_EVENT='*DPAD_DOWN), value 1'
BACK_60S_HAT_EVENT='*(ABS_HAT0Y), value 1*'
SKIP_60S_DPAD_EVENT='*(DPAD_UP), value 1'
SKIP_60S_DPAD_EVENT='*DPAD_UP), value 1'
SKIP_60S_HAT_EVENT='*(ABS_HAT0Y), value -1*'
QUIT_HOTKEY_EVENT='*(BTN_SELECT), value 1'
QUIT_SELECT_EVENT='*(BTN_START), value 1'
Expand All @@ -57,25 +57,25 @@ get_devices() {
INPUT_DEVICES+=("${DEVICE}")
if [[ "${SUPPORTS}" =~ ID_INPUT_KEY ]]
then
${DEBUG} log $0 "Found Keyboard: ${DEVICE}"
${DEBUG} && log $0 "Found Keyboard: ${DEVICE}"
FOUNDKEYS=true
elif [[ "${SUPPORTS}" =~ ID_INPUT_JOYSTICK ]]
then
${DEBUG} log $0 "Found Joystick: ${DEVICE}"
${DEBUG} && log $0 "Found Joystick: ${DEVICE}"
FOUNDJOY=true
fi
fi
done
if [ "${FOUNDKEYS}" = "true" ] &&
[ "${FOUNDJOY}" = "true" ]
then
${DEBUG} log $0 "Found all of the needed devices."
${DEBUG} && log $0 "Found all of the needed devices."
KJDEVS=true
break
fi
if [ "${RETRY}" -ge 5 ]
then
${DEBUG} log $0 "Did not find all of the needed devices, but that may be OK. Breaking."
${DEBUG} && log $0 "Did not find all of the needed devices, but that may be OK. Breaking."
break
else
RETRY=$(( ${RETRY} + 1 ))
Expand All @@ -100,11 +100,11 @@ get_devices
) | while read line; do
case ${line} in
(${CONTROLLER_DISCONNECTED})
${DEBUG} log $0 "Reloading due to ${CONTROLLER_DEVICE} reattach..."
${DEBUG} && log $0 "Reloading due to ${CONTROLLER_DEVICE} reattach..."
get_devices
;;
(${DEVICE_DISCONNECTED})
${DEBUG} log $0 "Reloading due to ${DEVICE} reattach..."
${DEBUG} && log $0 "Reloading due to ${DEVICE} reattach..."
get_devices
;;
(${PAUSE_EVENT})
Expand Down

0 comments on commit 3cf88aa

Please sign in to comment.