mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-25 15:35:38 +00:00
Configurator expansion
This commit is contained in:
parent
cdea3287a0
commit
11c176c9c6
|
@ -1,100 +1,9 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<gameList>
|
<gameList>
|
||||||
<game>
|
<game>
|
||||||
<path>./cheevos.sh</path>
|
<path>./configurator.sh</path>
|
||||||
<name>RetroAchievements Login</name>
|
<name>RetroDECK Configurator</name>
|
||||||
<desc>Enter your RetroAchievements account details.</desc>
|
<desc>Change settings, move folders and more!</desc>
|
||||||
<nogamecount>true</nogamecount>
|
|
||||||
<nomultiscrape>true</nomultiscrape>
|
|
||||||
</game>
|
|
||||||
<!-- <game>
|
|
||||||
<path>./start-retroarch.sh</path>
|
|
||||||
<name>Start RetroArch</name>
|
|
||||||
<desc>Start RetroArch to manually tweak your settings.</desc>
|
|
||||||
<nogamecount>true</nogamecount>
|
|
||||||
<nomultiscrape>true</nomultiscrape>
|
|
||||||
</game>
|
|
||||||
<game>
|
|
||||||
<path>./start-yuzu.sh</path>
|
|
||||||
<name>Start Yuzu</name>
|
|
||||||
<desc>Start Yuzu to manually tweak your settings.</desc>
|
|
||||||
<nogamecount>true</nogamecount>
|
|
||||||
<nomultiscrape>true</nomultiscrape>
|
|
||||||
</game>
|
|
||||||
<game>
|
|
||||||
<path>./start-pcsx2.sh</path>
|
|
||||||
<name>Start PCSX2 (Standalone)</name>
|
|
||||||
<desc>Start PCSX2 to manually tweak your settings.</desc>
|
|
||||||
<nogamecount>true</nogamecount>
|
|
||||||
<nomultiscrape>true</nomultiscrape>
|
|
||||||
</game>
|
|
||||||
<game>
|
|
||||||
<path>./start-ppsspp.sh</path>
|
|
||||||
<name>Start PPSSPP (Standalone)</name>
|
|
||||||
<desc>Start PPSSPP to manually tweak your settings.</desc>
|
|
||||||
<nogamecount>true</nogamecount>
|
|
||||||
<nomultiscrape>true</nomultiscrape>
|
|
||||||
</game>
|
|
||||||
<game>
|
|
||||||
<path>./start-dolphin.sh</path>
|
|
||||||
<name>Start Dolphin (Standalone)</name>
|
|
||||||
<desc>Start Dolphin to manually tweak your settings.</desc>
|
|
||||||
<nogamecount>true</nogamecount>
|
|
||||||
<nomultiscrape>true</nomultiscrape>
|
|
||||||
</game>
|
|
||||||
<game>
|
|
||||||
<path>./start-melonds.sh</path>
|
|
||||||
<name>Start MelonDS (Standalone)</name>
|
|
||||||
<desc>Start MelonDS to manually tweak your settings.</desc>
|
|
||||||
<nogamecount>true</nogamecount>
|
|
||||||
<nomultiscrape>true</nomultiscrape>
|
|
||||||
</game>
|
|
||||||
<game>
|
|
||||||
<path>./start-citra.sh</path>
|
|
||||||
<name>Start CITRA (Standalone)</name>
|
|
||||||
<desc>Start CITRA to manually tweak your settings.</desc>
|
|
||||||
<nogamecount>true</nogamecount>
|
|
||||||
<nomultiscrape>true</nomultiscrape>
|
|
||||||
</game>
|
|
||||||
<game>
|
|
||||||
<path>./start-rpcs3.sh</path>
|
|
||||||
<name>Start RPCS3 (Standalone)</name>
|
|
||||||
<desc>Start RPCS3 to manually tweak your settings.</desc>
|
|
||||||
<nogamecount>true</nogamecount>
|
|
||||||
<nomultiscrape>true</nomultiscrape>
|
|
||||||
</game> -->
|
|
||||||
<game>
|
|
||||||
<path>./start-splore.sh</path>
|
|
||||||
<name>Start Splore</name>
|
|
||||||
<desc>Start PICO-8's splore</desc>
|
|
||||||
<nogamecount>true</nogamecount>
|
|
||||||
<nomultiscrape>true</nomultiscrape>
|
|
||||||
</game>
|
|
||||||
<!-- <game>
|
|
||||||
<path>./move-roms.sh</path>
|
|
||||||
<name>Move roms folder</name>
|
|
||||||
<desc>Move roms folder from internal to external and vice versa.</desc>
|
|
||||||
<nogamecount>true</nogamecount>
|
|
||||||
<nomultiscrape>true</nomultiscrape>
|
|
||||||
</game>
|
|
||||||
<game>
|
|
||||||
<path>./overlays.sh</path>
|
|
||||||
<name>Overlays configuration</name>
|
|
||||||
<desc>Configure or disable borders and shaders.</desc>
|
|
||||||
<nogamecount>true</nogamecount>
|
|
||||||
<nomultiscrape>true</nomultiscrape>
|
|
||||||
</game> -->
|
|
||||||
<game>
|
|
||||||
<path>./configure-emulators.sh</path>
|
|
||||||
<name>Configure Emulators</name>
|
|
||||||
<desc>Choose an emulator to configure.</desc>
|
|
||||||
<nogamecount>true</nogamecount>
|
|
||||||
<nomultiscrape>true</nomultiscrape>
|
|
||||||
</game>
|
|
||||||
<game>
|
|
||||||
<path>./rewind.sh</path>
|
|
||||||
<name>Rewind toggler</name>
|
|
||||||
<desc>Enable or disable the rewind function for some RetroArch cores.</desc>
|
|
||||||
<nogamecount>true</nogamecount>
|
<nogamecount>true</nogamecount>
|
||||||
<nomultiscrape>true</nomultiscrape>
|
<nomultiscrape>true</nomultiscrape>
|
||||||
</game>
|
</game>
|
||||||
|
|
0
tools/cheevos.sh → tools/cheevos.sh.disabled
Executable file → Normal file
0
tools/cheevos.sh → tools/cheevos.sh.disabled
Executable file → Normal file
|
@ -13,6 +13,7 @@ citraconf="/var/config/citra-emu/qt-config.ini"
|
||||||
melondsconf="/var/config/melonDS/melonDS.ini"
|
melondsconf="/var/config/melonDS/melonDS.ini"
|
||||||
rpcs3conf="/var/config/rpcs3/config.yml"
|
rpcs3conf="/var/config/rpcs3/config.yml"
|
||||||
yuzuconf="/var/config/yuzu/qt-config.ini"
|
yuzuconf="/var/config/yuzu/qt-config.ini"
|
||||||
|
source $rd_conf
|
||||||
|
|
||||||
# Dolphin config files
|
# Dolphin config files
|
||||||
|
|
||||||
|
@ -63,56 +64,108 @@ move() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
edit_setting() {
|
set_setting() {
|
||||||
# Function for editing settings
|
# Function for editing settings
|
||||||
# USAGE: $(edit_setting $setting_name $new_setting_value $system) (needed as different systems use different config file syntaxes)
|
# USAGE: $(set_setting $setting_file $setting_name $new_setting_value $system) (needed as different systems use different config file syntax)
|
||||||
|
|
||||||
|
case $4 in
|
||||||
}
|
|
||||||
|
|
||||||
get_setting_value() {
|
|
||||||
# Function for getting the current value of a setting from a config file
|
|
||||||
# USAGE: $(get_setting_value $setting_name $system) (needed as different systems use different config file syntaxes)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
case $2 in
|
|
||||||
|
|
||||||
"retrodeck" )
|
"retrodeck" )
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"retroarch" )
|
"retroarch" )
|
||||||
echo $(grep $2 $raconf | grep -o -P "(?<=$2 = \").*(?=\")")
|
sed -i "s/$2 = \".*\"/$2 = \"$3\"/" $1
|
||||||
;;
|
|
||||||
|
|
||||||
"retroarch-core-configs" )
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"dolphin" )
|
"dolphin" )
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"duckstation" )
|
"duckstation" )
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"pcsx2" )
|
"pcsx2" )
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"ppsspp" )
|
"ppsspp" )
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"rpcs3" )
|
"rpcs3" )
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"yuzu" )
|
"yuzu" )
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"citra" )
|
"citra" )
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"melonds" )
|
"melonds" )
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"xemu" )
|
"xemu" )
|
||||||
|
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
get_setting() {
|
||||||
|
# Function for getting the current value of a setting from a config file
|
||||||
|
# USAGE: $(get_setting $setting_file $setting_name $system) (needed as different systems use different config file syntax)
|
||||||
|
|
||||||
|
case $3 in
|
||||||
|
|
||||||
|
"retrodeck" )
|
||||||
|
#echo $(grep $2 $1 | grep -o -P "(?<=$2 = \").*(?=\")")
|
||||||
|
;;
|
||||||
|
|
||||||
|
"retroarch" )
|
||||||
|
echo $(grep $2 $1 | grep -o -P "(?<=$2 = \").*(?=\")")
|
||||||
|
;;
|
||||||
|
|
||||||
|
"dolphin" )
|
||||||
|
#echo $(grep $2 $1 | grep -o -P "(?<=$2 = \").*(?=\")")
|
||||||
|
;;
|
||||||
|
|
||||||
|
"duckstation" )
|
||||||
|
#echo $(grep $2 $1 | grep -o -P "(?<=$2 = \").*(?=\")")
|
||||||
|
;;
|
||||||
|
|
||||||
|
"pcsx2" )
|
||||||
|
#echo $(grep $2 $1 | grep -o -P "(?<=$2 = \").*(?=\")")
|
||||||
|
;;
|
||||||
|
|
||||||
|
"ppsspp" )
|
||||||
|
#echo $(grep $2 $1 | grep -o -P "(?<=$2 = \").*(?=\")")
|
||||||
|
;;
|
||||||
|
|
||||||
|
"rpcs3" )
|
||||||
|
#echo $(grep $2 $1 | grep -o -P "(?<=$2 = \").*(?=\")")
|
||||||
|
;;
|
||||||
|
|
||||||
|
"yuzu" )
|
||||||
|
#echo $(grep $2 $1 | grep -o -P "(?<=$2 = \").*(?=\")")
|
||||||
|
;;
|
||||||
|
|
||||||
|
"citra" )
|
||||||
|
#echo $(grep $2 $1 | grep -o -P "(?<=$2 = \").*(?=\")")
|
||||||
|
;;
|
||||||
|
|
||||||
|
"melonds" )
|
||||||
|
#echo $(grep $2 $1 | grep -o -P "(?<=$2 = \").*(?=\")")
|
||||||
|
;;
|
||||||
|
|
||||||
|
"xemu" )
|
||||||
|
#echo $(grep $2 $1 | grep -o -P "(?<=$2 = \").*(?=\")")
|
||||||
;;
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
@ -307,39 +360,72 @@ configurator_power_user_changes_dialog() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
configurator_rewind_dialog() {
|
configurator_retroarch_rewind_dialog() {
|
||||||
zenity --question \
|
if [[ $(get_setting $raconf rewind_enable retroarch) == "true" ]]; then
|
||||||
--no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
zenity --question \
|
||||||
--title "RetroDECK" \
|
--no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||||
--text="Do you want to enable the rewind function in RetroArch cores?\n\nNOTE:\nThis may impact on performances expecially on the latest systems."
|
--title "RetroDECK Configurator - Rewind" \
|
||||||
|
--text="Rewind is currently enabled. Do you want to disable it?."
|
||||||
|
|
||||||
if [ $? == 0 ] #yes, enable
|
if [ $? == 0 ]
|
||||||
then
|
then
|
||||||
sed -i 's%rewind_enable = .*%rewind_enable = "true"' $raconf
|
set_setting $raconf rewind_enable true retroarch
|
||||||
zenity --info \
|
zenity --info \
|
||||||
--no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
--no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||||
--title "RetroDECK" \
|
--title "RetroDECK Configurator - Rewind" \
|
||||||
--text="Rewind enabled\!\nYou can check on Libretro docs to see which cores supports this function."
|
--text="Rewind enabled\!\nYou can check on Libretro docs to see which cores supports this function."
|
||||||
else # no, disable
|
else
|
||||||
sed -i 's%rewind_enable = .*%rewind_enable = "false"' $raconf
|
configurator_options_dialog
|
||||||
zenity --info \
|
fi
|
||||||
--no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
else
|
||||||
--title "RetroDECK" \
|
zenity --question \
|
||||||
--text="Rewind disabled."
|
--no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||||
|
--title "RetroDECK Configurator - Rewind" \
|
||||||
|
--text="Rewind is currently disabled, do you want to enable it?\n\nNOTE:\nThis may impact performance expecially on the latest systems."
|
||||||
|
|
||||||
|
if [ $? == 0 ]
|
||||||
|
then
|
||||||
|
set_setting $raconf rewind_enable false retroarch
|
||||||
|
zenity --info \
|
||||||
|
--no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||||
|
--title "RetroDECK Configurator - Rewind" \
|
||||||
|
--text="Rewind disabled."
|
||||||
|
else
|
||||||
|
configurator_options_dialog
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configurator_retroarch_options_dialog() {
|
||||||
|
choice=$(zenity --list --title="RetroDECK Configurator Utility - RetroArch Options" --cancel-label="Back" \
|
||||||
|
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||||
|
--column="Choice" --column="Action" \
|
||||||
|
"Change Rewind Setting" "Enable or disable the Rewind function in RetroArch" )
|
||||||
|
|
||||||
|
case $choice in
|
||||||
|
|
||||||
|
"Change Rewind Setting" )
|
||||||
|
configurator_retroarch_rewind_dialog
|
||||||
|
;;
|
||||||
|
|
||||||
|
"" ) # No selection made or Back button clicked
|
||||||
|
configurator_options_dialog
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
configurator_options_dialog() {
|
configurator_options_dialog() {
|
||||||
choice=$(zenity --list --title="RetroDECK Configurator Utility - Change Options" --cancel-label="Back" \
|
choice=$(zenity --list --title="RetroDECK Configurator Utility - Change Options" --cancel-label="Back" \
|
||||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||||
--column="Choice" --column="Action" \
|
--column="Choice" --column="Action" \
|
||||||
"Enable-Disable Rewind" "Enable or disable Rewind function in RetroArch" \
|
"Change RetroArch Settings" "Change settings specific to RetroArch" \
|
||||||
"Power User Changes" "Make changes directly in an emulator" )
|
"Power User Changes" "Make changes directly in an emulator" )
|
||||||
|
|
||||||
case $choice in
|
case $choice in
|
||||||
|
|
||||||
"Enable-Disable Rewind" )
|
"Change RetroArch Settings" )
|
||||||
configurator_rewind_dialog
|
configurator_retroarch_options_dialog
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Power User Changes" )
|
"Power User Changes" )
|
||||||
|
|
0
tools/rewind.sh → tools/rewind.sh.disabled
Executable file → Normal file
0
tools/rewind.sh → tools/rewind.sh.disabled
Executable file → Normal file
Loading…
Reference in a new issue