Created
October 8, 2025 14:22
-
-
Save Langerz82/b2dde6ced6b1eb9fffa6c5a5fe959807 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find_gamepad() { | |
local SDLJOYTEST="/tmp/emulation/amiberry/sdljoytest" | |
sdljoytest -skip_loop > ${SDLJOYTEST} | |
local GC_NAME=$(cat ${SDLJOYTEST} | grep "Joystick 0 name" | cut -d"'" -f2) | |
if [[ ! -z "${GC_NAME}" ]] && [[ -f "/tmp/joypads/${GC_NAME}.cfg" ]]; then | |
sed -i "s|joyport1_friendlyname=.*|joyport1_friendlyname=${GC_NAME}|" "$AMIBERRY_TMP_CONFIG" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment