mednafen: hard code modifiers to L3 and R3 for 360 controllers
This commit is contained in:
parent
3639b6a5bd
commit
720e4be57f
1 changed files with 12 additions and 6 deletions
|
@ -9,18 +9,24 @@
|
||||||
GUID1="$(mednafen --list-joysticks | grep ID | awk 'NR==1 {print $2}')"
|
GUID1="$(mednafen --list-joysticks | grep ID | awk 'NR==1 {print $2}')"
|
||||||
sed -e "s/@GUID1@/${GUID1}/g" ${MEDNAFEN_CONFIG} >> $MEDNAFEN_HOME/mednafen.cfg
|
sed -e "s/@GUID1@/${GUID1}/g" ${MEDNAFEN_CONFIG} >> $MEDNAFEN_HOME/mednafen.cfg
|
||||||
|
|
||||||
# Replace modifiers with actual buttons
|
|
||||||
for MOD in DEVICE_FUNC_KEYA_MODIFIER DEVICE_FUNC_KEYB_MODIFIER
|
|
||||||
do
|
|
||||||
sed -i -e "s/${MOD}/DEVICE_${!MOD}/g" $MEDNAFEN_HOME/mednafen.cfg
|
|
||||||
done
|
|
||||||
|
|
||||||
NAME="$(mednafen --list-joysticks | grep ID | awk 'NR==1 {print $5$6}')"
|
NAME="$(mednafen --list-joysticks | grep ID | awk 'NR==1 {print $5$6}')"
|
||||||
if [[ "$(mednafen --list-joysticks | grep ID | awk 'NR==1 {print $4}')" = "8BitDo" ]]
|
if [[ "$(mednafen --list-joysticks | grep ID | awk 'NR==1 {print $4}')" = "8BitDo" ]]
|
||||||
then
|
then
|
||||||
NAME="X-Box360"
|
NAME="X-Box360"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "${NAME}" = "X-Box360" ]]
|
||||||
|
then
|
||||||
|
export DEVICE_FUNC_KEYA_MODIFIER="BTN_THUMBL"
|
||||||
|
export DEVICE_FUNC_KEYB_MODIFIER="BTN_THUMBR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Replace modifiers with actual buttons
|
||||||
|
for MOD in DEVICE_FUNC_KEYA_MODIFIER DEVICE_FUNC_KEYB_MODIFIER
|
||||||
|
do
|
||||||
|
sed -i -e "s/${MOD}/DEVICE_${!MOD}/g" $MEDNAFEN_HOME/mednafen.cfg
|
||||||
|
done
|
||||||
|
|
||||||
# Controller config for 360 and GPIO handled separately
|
# Controller config for 360 and GPIO handled separately
|
||||||
if [[ "${NAME}" = "X-Box360" ]]
|
if [[ "${NAME}" = "X-Box360" ]]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in a new issue