mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
Merge pull request #2353 from porschemad911/yabasanshiro-sa-inputplumber
yabasanshiro-sa - inputplumber
This commit is contained in:
@@ -37,12 +37,19 @@ fi
|
||||
if [ ! -e "${CONFIG_DIR}/input.cfg" ]
|
||||
then
|
||||
rm -f ${CONFIG_DIR}/keymapv2.json
|
||||
# Check for js0, else fall back to joypad
|
||||
if grep -q "js0" /proc/bus/input/devices; then
|
||||
GAMEPAD="'$(grep -b4 js0 /proc/bus/input/devices | awk 'BEGIN {FS="\""}; /Name/ {printf $2}')'"
|
||||
|
||||
# Handle inputplumber platforms first
|
||||
if [[ "${HW_DEVICE}" =~ SM8550|SM8650 ]]; then
|
||||
GAMEPAD="'InputPlumber GameController'"
|
||||
else
|
||||
GAMEPAD="'$(grep -b4 joypad /proc/bus/input/devices | awk 'BEGIN {FS="\""}; /Name/ {printf $2}')'"
|
||||
# Check for js0, else fall back to joypad
|
||||
if grep -q "js0" /proc/bus/input/devices; then
|
||||
GAMEPAD="'$(grep -b4 js0 /proc/bus/input/devices | awk 'BEGIN {FS="\""}; /Name/ {printf $2}')'"
|
||||
else
|
||||
GAMEPAD="'$(grep -b4 joypad /proc/bus/input/devices | awk 'BEGIN {FS="\""}; /Name/ {printf $2}')'"
|
||||
fi
|
||||
fi
|
||||
|
||||
GAMEPADCONFIG=$(xmlstarlet sel -t -c "//inputList/inputConfig[@deviceName=${GAMEPAD}]" -n /storage/.emulationstation/es_input.cfg)
|
||||
|
||||
MAPPING_FILE="/usr/config/yabasanshiro/devices/keymapv2_$(eval echo $GAMEPAD).json"
|
||||
|
||||
@@ -273,6 +273,7 @@ if [[ "${HW_DEVICE}" =~ SM8550|SM8650 && ! -e "/storage/.inputplumber_migration_
|
||||
rm -rf /storage/.config/Cemu
|
||||
rm -rf /storage/.config/melonDS
|
||||
rm -rf /storage/.config/mupen64plus
|
||||
rm -rf /storage/.config/yabasanshiro
|
||||
|
||||
# Mark migration as complete
|
||||
touch /storage/.inputplumber_migration_complete
|
||||
|
||||
Reference in New Issue
Block a user