Xenia: Hotfix per game configs (#1174)

* Added prefix injection into custom systems so users can add per-game configs
This commit is contained in:
rawdatafeel 2024-04-04 14:32:04 -04:00 committed by GitHub
parent e8dc0935ee
commit 97b688709a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View file

@ -54,7 +54,7 @@
<fullname>Microsoft Xbox 360</fullname>
<path>%ROMPATH%/xbox360/roms</path>
<extension>.iso .ISO . .xex .XEX .zar .ZAR</extension>
<command label="Xenia (Proton)">/bin/bash /run/media/mmcblk0p1/Emulation/tools/launchers/xenia.sh z:%ROM%</command>
<command label="Xenia (Proton)">/bin/bash /run/media/mmcblk0p1/Emulation/tools/launchers/xenia.sh z:%ROM% %INJECT%=%BASENAME%.esprefix</command>
<platform>xbox360</platform>
<theme>xbox360</theme>
</system>

View file

@ -86,7 +86,7 @@ Xenia_addESConfig(){
--subnode '$newSystem' --type elem --name 'fullname' -v 'Microsoft Xbox 360' \
--subnode '$newSystem' --type elem --name 'path' -v '%ROMPATH%/xbox360/roms' \
--subnode '$newSystem' --type elem --name 'extension' -v '.iso .ISO . .xex .XEX' \
--subnode '$newSystem' --type elem --name 'commandP' -v "/bin/bash ${toolsPath}/launchers/xenia.sh z:%ROM%" \
--subnode '$newSystem' --type elem --name 'commandP' -v "/bin/bash ${toolsPath}/launchers/xenia.sh z:%ROM% %INJECT%=%BASENAME%.esprefix" \
--insert '$newSystem/commandP' --type attr --name 'label' --value "Xenia (Proton)" \
--subnode '$newSystem' --type elem --name 'platform' -v 'xbox360' \
--subnode '$newSystem' --type elem --name 'theme' -v 'xbox360' \

View file

@ -252,7 +252,7 @@ ESDE_setEmulationFolder(){
if [[ ! $(grep -rnw "$es_systemsFile" -e 'xbox360') == "" ]]; then
if [[ $(grep -rnw "$es_systemsFile" -e 'Xenia (Proton)') == "" ]]; then
#insert
xmlstarlet ed -S --inplace --subnode 'systemList/system[name="xbox360"]' --type elem --name 'commandP' -v "/bin/bash ${toolsPath}/launchers/xenia.sh z:%ROM%" \
xmlstarlet ed -S --inplace --subnode 'systemList/system[name="xbox360"]' --type elem --name 'commandP' -v "/bin/bash ${toolsPath}/launchers/xenia.sh z:%ROM% %INJECT%=%BASENAME%.esprefix" \
--insert 'systemList/system/commandP' --type attr --name 'label' --value "Xenia (Proton)" \
-r 'systemList/system/commandP' -v 'command' \
"$es_systemsFile"
@ -261,7 +261,7 @@ ESDE_setEmulationFolder(){
xmlstarlet fo "$es_systemsFile" > "$es_systemsFile".tmp && mv "$es_systemsFile".tmp "$es_systemsFile"
else
#update
xeniaProtonCommandString="/bin/bash ${toolsPath}/launchers/xenia.sh z:%ROM%"
xeniaProtonCommandString="/bin/bash ${toolsPath}/launchers/xenia.sh z:%ROM% %INJECT%=%BASENAME%.esprefix"
xmlstarlet ed -L -u '/systemList/system/command[@label="Xenia (Proton)"]' -v "$xeniaProtonCommandString" "$es_systemsFile"
fi
fi