mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-24 23:15:39 +00:00
Improve readbility of presets dialog
Improve handling of internal system names Add internal->user readable system name translation Disable PS4 in es_systems Improve get_setting_value handling of missing setting name in section Add systems to borders, widescreen and nintendo_button_layout presets
This commit is contained in:
parent
e2cdcb9da3
commit
55d45432d4
|
@ -1,10 +1,6 @@
|
||||||
config_file_format^retroarch
|
config_file_format^retroarch
|
||||||
target_file^/var/config/retroarch/config/Snes9x/snes.cfg
|
target_file^/var/config/retroarch/config/Snes9x/snes.cfg
|
||||||
defaults_file^$emuconfigs/retroarch/retroarch.cfg
|
defaults_file^$emuconfigs/retroarch/retroarch.cfg
|
||||||
change^cheevos^cheevos_enable^true
|
|
||||||
change^cheevos^cheevos_token^$cheevos_token
|
|
||||||
change^cheevos^cheevos_username^$cheevos_username
|
|
||||||
change^cheevos_hardcore^cheevos_hardcore_mode_enable^true
|
|
||||||
change^borders^input_overlay^/var/config/retroarch/overlays/borders/pegasus/snes87.cfg
|
change^borders^input_overlay^/var/config/retroarch/overlays/borders/pegasus/snes87.cfg
|
||||||
change^borders^input_overlay_aspect_adjust_landscape^0.305000
|
change^borders^input_overlay_aspect_adjust_landscape^0.305000
|
||||||
change^borders^input_overlay_scale_landscape^1.050000
|
change^borders^input_overlay_scale_landscape^1.050000
|
||||||
|
|
14
emu-configs/defaults/retrodeck/presets/gb_presets.cfg
Normal file
14
emu-configs/defaults/retrodeck/presets/gb_presets.cfg
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
config_file_format^retroarch
|
||||||
|
target_file^/var/config/retroarch/config/Gambatte/gb.cfg
|
||||||
|
defaults_file^$emuconfigs/retroarch/retroarch.cfg
|
||||||
|
change^borders^aspect_ratio_index^23
|
||||||
|
change^borders^custom_viewport_height^576
|
||||||
|
change^borders^custom_viewport_width^640
|
||||||
|
change^borders^custom_viewport_x^320
|
||||||
|
change^borders^custom_viewport_y^20
|
||||||
|
change^borders^input_overlay^/var/config/retroarch/overlays/borders/pegasus/gb.cfg
|
||||||
|
change^borders^input_overlay_aspect_adjust_landscape^0.110000
|
||||||
|
change^borders^input_overlay_enable^true
|
||||||
|
change^borders^input_overlay_scale_landscape^1.205000
|
||||||
|
change^borders^input_overlay_y_offset_landscape^0.005000
|
||||||
|
enable^nintendo_button_layout^/var/config/retroarch/config/remaps/Gambatte/gb.rmp
|
13
emu-configs/defaults/retrodeck/presets/gba_presets.cfg
Normal file
13
emu-configs/defaults/retrodeck/presets/gba_presets.cfg
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
config_file_format^retroarch
|
||||||
|
target_file^/var/config/retroarch/config/mGBA/gba.cfg
|
||||||
|
defaults_file^$emuconfigs/retroarch/retroarch.cfg
|
||||||
|
change^borders^aspect_ratio_index^23
|
||||||
|
change^borders^custom_viewport_height^600
|
||||||
|
change^borders^custom_viewport_width^900
|
||||||
|
change^borders^custom_viewport_x^190
|
||||||
|
change^borders^custom_viewport_y^37
|
||||||
|
change^borders^input_overlay^/var/config/retroarch/overlays/borders/pegasus/gba.cfg
|
||||||
|
change^borders^input_overlay_aspect_adjust_landscape^0.105000
|
||||||
|
change^borders^input_overlay_enable^true
|
||||||
|
change^borders^input_overlay_scale_landscape^1.140000
|
||||||
|
enable^nintendo_button_layout^/var/config/retroarch/config/remaps/Gambatte/gbc.rmp
|
14
emu-configs/defaults/retrodeck/presets/gbc_presets.cfg
Normal file
14
emu-configs/defaults/retrodeck/presets/gbc_presets.cfg
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
config_file_format^retroarch
|
||||||
|
target_file^/var/config/retroarch/config/Gambatte/gbc.cfg
|
||||||
|
defaults_file^$emuconfigs/retroarch/retroarch.cfg
|
||||||
|
change^borders^aspect_ratio_index^23
|
||||||
|
change^borders^custom_viewport_height^576
|
||||||
|
change^borders^custom_viewport_width^640
|
||||||
|
change^borders^custom_viewport_x^320
|
||||||
|
change^borders^custom_viewport_y^20
|
||||||
|
change^borders^input_overlay^/var/config/retroarch/overlays/borders/pegasus/gbc.cfg
|
||||||
|
change^borders^input_overlay_aspect_adjust_landscape^0.110000
|
||||||
|
change^borders^input_overlay_enable^true
|
||||||
|
change^borders^input_overlay_scale_landscape^1.205000
|
||||||
|
change^borders^input_overlay_y_offset_landscape^0.005000
|
||||||
|
enable^nintendo_button_layout^/var/config/retroarch/config/remaps/Gambatte/gbc.rmp
|
|
@ -0,0 +1,8 @@
|
||||||
|
config_file_format^retroarch
|
||||||
|
target_file^/var/config/retroarch/config/Genesis Plus GX/genesis.cfg
|
||||||
|
defaults_file^$emuconfigs/retroarch/retroarch.cfg
|
||||||
|
change^borders^input_overlay^input_overlay^/var/config/retroarch/overlays/borders/pegasus/genesis.cfg
|
||||||
|
change^borders^input_overlay_aspect_adjust_landscape^0.100000
|
||||||
|
change^borders^input_overlay_enable^true
|
||||||
|
change^borders^input_overlay_scale_landscape^1.040000
|
||||||
|
change^widescreen^aspect_ratio_index^24
|
11
emu-configs/defaults/retrodeck/presets/gg_presets.cfg
Normal file
11
emu-configs/defaults/retrodeck/presets/gg_presets.cfg
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
config_file_format^retroarch
|
||||||
|
target_file^/var/config/retroarch/config/Genesis Plus GX/gg.cfg
|
||||||
|
defaults_file^$emuconfigs/retroarch/retroarch.cfg
|
||||||
|
change^borders^input_overlay^aspect_ratio_index^23
|
||||||
|
change^borders^custom_viewport_width^800
|
||||||
|
change^borders^custom_viewport_x^240
|
||||||
|
change^borders^custom_viewport_y^43
|
||||||
|
change^borders^input_overlay^/var/config/retroarch/overlays/borders/pegasus/gg.cfg
|
||||||
|
change^borders^input_overlay_aspect_adjust_landscape^-0.080000
|
||||||
|
change^borders^input_overlay_enable^true
|
||||||
|
change^borders^input_overlay_scale_landscape^1.345000
|
8
emu-configs/defaults/retrodeck/presets/n64_presets.cfg
Normal file
8
emu-configs/defaults/retrodeck/presets/n64_presets.cfg
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
config_file_format^retroarch
|
||||||
|
target_file^/var/config/retroarch/config/Mupen64Plus-Next/n64.cfg
|
||||||
|
defaults_file^$emuconfigs/retroarch/retroarch.cfg
|
||||||
|
change^borders^input_overlay^/var/config/retroarch/overlays/borders/pegasus/N64.cfg
|
||||||
|
change^borders^input_overlay_aspect_adjust_landscape^0.145000
|
||||||
|
change^borders^input_overlay_enable^true
|
||||||
|
change^widescreen^aspect_ratio_index^24
|
||||||
|
enable^nintendo_button_layout^/var/config/retroarch/config/remaps/Snes9x/snes.rmp
|
|
@ -0,0 +1,8 @@
|
||||||
|
config_file_format^retroarch
|
||||||
|
target_file^/var/config/retroarch/config/SwanStation/psx.cfg
|
||||||
|
defaults_file^$emuconfigs/retroarch/retroarch.cfg
|
||||||
|
change^borders^input_overlay^/var/config/retrodeck/overlays/borders/pegasus/psx.cfg
|
||||||
|
change^borders^input_overlay_aspect_adjust_landscape^0.120000
|
||||||
|
change^borders^input_overlay_enable^true
|
||||||
|
change^borders^input_overlay_scale_landscape^1.040000
|
||||||
|
change^widescreen^aspect_ratio_index^24
|
|
@ -0,0 +1,4 @@
|
||||||
|
input_player1_btn_a = "0"
|
||||||
|
input_player1_btn_b = "8"
|
||||||
|
input_player1_btn_x = "1"
|
||||||
|
input_player1_btn_y = "9"
|
|
@ -0,0 +1,4 @@
|
||||||
|
input_player1_btn_a = "0"
|
||||||
|
input_player1_btn_b = "8"
|
||||||
|
input_player1_btn_x = "1"
|
||||||
|
input_player1_btn_y = "9"
|
|
@ -0,0 +1,4 @@
|
||||||
|
input_player1_btn_a = "0"
|
||||||
|
input_player1_btn_b = "8"
|
||||||
|
input_player1_btn_x = "1"
|
||||||
|
input_player1_btn_y = "9"
|
|
@ -0,0 +1,4 @@
|
||||||
|
input_player1_btn_a = "0"
|
||||||
|
input_player1_btn_b = "8"
|
||||||
|
input_player1_btn_x = "1"
|
||||||
|
input_player1_btn_y = "9"
|
|
@ -0,0 +1,4 @@
|
||||||
|
input_player1_btn_a = "0"
|
||||||
|
input_player1_btn_b = "8"
|
||||||
|
input_player1_btn_x = "1"
|
||||||
|
input_player1_btn_y = "9"
|
|
@ -0,0 +1,11 @@
|
||||||
|
duckstation^Duckstation (Sony Playstation Standalone)
|
||||||
|
gb^Nintendo GameBoy
|
||||||
|
gba^Nintendo GameBoy Advance
|
||||||
|
gbc^Nintendo GameBoy Color
|
||||||
|
genesis^Sega Genesis/Master System
|
||||||
|
gg^Sega GameGear
|
||||||
|
n64^Nintendo 64
|
||||||
|
pcsx2^PCSX2 (Sony Playstation 2 Standalone)
|
||||||
|
psx_ra^Sony Playstation (RetroArch Core)
|
||||||
|
retroarch^RetroArch (Multi-emulator Frontend)
|
||||||
|
snes^Nintendo Super Nintendo
|
|
@ -29,20 +29,34 @@ default_user=
|
||||||
developer_options=false
|
developer_options=false
|
||||||
|
|
||||||
[cheevos]
|
[cheevos]
|
||||||
Duckstation=false
|
duckstation=false
|
||||||
PCSX2=false
|
pcsx2=false
|
||||||
RetroArch=false
|
retroarch=false
|
||||||
|
|
||||||
[cheevos_hardcore]
|
[cheevos_hardcore]
|
||||||
Duckstation=false
|
duckstation=false
|
||||||
PCSX2=false
|
pcsx2=false
|
||||||
RetroArch=false
|
retroarch=false
|
||||||
|
|
||||||
[borders]
|
[borders]
|
||||||
SNES=false
|
gb=false
|
||||||
|
gba=false
|
||||||
|
gbc=false
|
||||||
|
genesis=false
|
||||||
|
gg=false
|
||||||
|
n64=false
|
||||||
|
psx_ra=false
|
||||||
|
snes=false
|
||||||
|
|
||||||
[widescreen]
|
[widescreen]
|
||||||
SNES=false
|
genesis=false
|
||||||
|
n64=false
|
||||||
|
psx_ra=false
|
||||||
|
snes=false
|
||||||
|
|
||||||
[nintendo_button_layout]
|
[nintendo_button_layout]
|
||||||
SNES=false
|
gb=false
|
||||||
|
gba=false
|
||||||
|
gbc=false
|
||||||
|
n64=false
|
||||||
|
snes=false
|
||||||
|
|
|
@ -1269,7 +1269,7 @@
|
||||||
<platform>ps3</platform>
|
<platform>ps3</platform>
|
||||||
<theme>ps3</theme>
|
<theme>ps3</theme>
|
||||||
</system>
|
</system>
|
||||||
<system>
|
<!-- <system>
|
||||||
<name>ps4</name>
|
<name>ps4</name>
|
||||||
<fullname>Sony PlayStation 4</fullname>
|
<fullname>Sony PlayStation 4</fullname>
|
||||||
<path>%ROMPATH%/ps4</path>
|
<path>%ROMPATH%/ps4</path>
|
||||||
|
@ -1277,7 +1277,7 @@
|
||||||
<command>PLACEHOLDER %ROM%</command>
|
<command>PLACEHOLDER %ROM%</command>
|
||||||
<platform>ps4</platform>
|
<platform>ps4</platform>
|
||||||
<theme>ps4</theme>
|
<theme>ps4</theme>
|
||||||
</system>
|
</system> -->
|
||||||
<system>
|
<system>
|
||||||
<name>psp</name>
|
<name>psp</name>
|
||||||
<fullname>Sony PlayStation Portable</fullname>
|
<fullname>Sony PlayStation Portable</fullname>
|
||||||
|
|
|
@ -238,6 +238,14 @@ backup_retrodeck_userdata() {
|
||||||
zip -rq9 "$backups_folder/$(date +"%0m%0d")_retrodeck_userdata.zip" "$saves_folder" "$states_folder" "$bios_folder" "$media_folder" "$themes_folder" "$logs_folder" "$screenshots_folder" "$mods_folder" "$texture_packs_folder" "$borders_folder" > $logs_folder/$(date +"%0m%0d")_backup_log.log
|
zip -rq9 "$backups_folder/$(date +"%0m%0d")_retrodeck_userdata.zip" "$saves_folder" "$states_folder" "$bios_folder" "$media_folder" "$themes_folder" "$logs_folder" "$screenshots_folder" "$mods_folder" "$texture_packs_folder" "$borders_folder" > $logs_folder/$(date +"%0m%0d")_backup_log.log
|
||||||
}
|
}
|
||||||
|
|
||||||
|
make_name_pretty() {
|
||||||
|
# This function will take an internal system name (like "gbc") and return a pretty version for user display ("Nintendo GameBoy Color")
|
||||||
|
# USAGE: make_name_pretty "system name"
|
||||||
|
local system=$(grep "$1^" "$pretty_system_names_reference_list")
|
||||||
|
IFS='^' read -r internal_name pretty_name < <(echo "$system")
|
||||||
|
echo "$pretty_name"
|
||||||
|
}
|
||||||
|
|
||||||
finit_browse() {
|
finit_browse() {
|
||||||
# Function for choosing data directory location during first/forced init
|
# Function for choosing data directory location during first/forced init
|
||||||
path_selected=false
|
path_selected=false
|
||||||
|
|
|
@ -43,8 +43,9 @@ helper_files_list="$emuconfigs/defaults/retrodeck/reference_lists/helper_files_l
|
||||||
rd_appdata="/app/share/appdata/net.retrodeck.retrodeck.appdata.xml" # The shipped appdata XML file for this version
|
rd_appdata="/app/share/appdata/net.retrodeck.retrodeck.appdata.xml" # The shipped appdata XML file for this version
|
||||||
rpcs3_firmware="http://dus01.ps3.update.playstation.net/update/ps3/image/us/2023_0228_05fe32f5dc8c78acbcd84d36ee7fdc5b/PS3UPDAT.PUP"
|
rpcs3_firmware="http://dus01.ps3.update.playstation.net/update/ps3/image/us/2023_0228_05fe32f5dc8c78acbcd84d36ee7fdc5b/PS3UPDAT.PUP"
|
||||||
RA_API_URL="https://retroachievements.org/dorequest.php" # API URL for RetroAchievements.org
|
RA_API_URL="https://retroachievements.org/dorequest.php" # API URL for RetroAchievements.org
|
||||||
presets_dir="$emuconfigs/defaults/retrodeck/presets"
|
presets_dir="$emuconfigs/defaults/retrodeck/presets" # Repository for all system preset config files
|
||||||
incompatible_presets_reference_list="$emuconfigs/defaults/retrodeck/reference_lists/incompatible_presets.cfg"
|
incompatible_presets_reference_list="$emuconfigs/defaults/retrodeck/reference_lists/incompatible_presets.cfg" # A config file listing all incompatible presets for reference (eg. cannot have borders and widescreen enabled simultaniously)
|
||||||
|
pretty_system_names_reference_list="$emuconfigs/defaults/retrodeck/reference_lists/pretty_system_names.cfg" # An internal translation list for turning internal names (eg. gbc) to "pretty" names (Nintendo GameBoy Color)
|
||||||
|
|
||||||
# Config files for emulators with single config files
|
# Config files for emulators with single config files
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ get_setting_value() {
|
||||||
if [[ -z $current_section_name ]]; then
|
if [[ -z $current_section_name ]]; then
|
||||||
echo $(grep -o -P "(?<=^$current_setting_name=).*" $1)
|
echo $(grep -o -P "(?<=^$current_setting_name=).*" $1)
|
||||||
else
|
else
|
||||||
sed -n '\^\['"$current_section_name"'\]^,\^\^'"$current_setting_name"'^{ \^\['"$current_section_name"'\]^! { \^\^'"$current_setting_name"'^ p } }' $1 | grep -o -P "(?<=^$current_setting_name=).*"
|
sed -n -E '\^\['"$current_section_name"'\]^,\^\^'"$current_setting_name"'|\[^{ \^\['"$current_section_name"'\]^! { \^\^'"$current_setting_name"'^ p } }' $1 | grep -o -P "(?<=^$current_setting_name=).*"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ get_setting_value() {
|
||||||
if [[ -z $current_section_name ]]; then
|
if [[ -z $current_section_name ]]; then
|
||||||
echo $(grep -o -P "(?<=^$current_setting_name = \").*(?=\")" $1)
|
echo $(grep -o -P "(?<=^$current_setting_name = \").*(?=\")" $1)
|
||||||
else
|
else
|
||||||
sed -n '\^\['"$current_section_name"'\]^,\^\^'"$current_setting_name"'^{ \^\['"$current_section_name"'\]^! { \^\^'"$current_setting_name"'^ p } }' $1 | grep -o -P "(?<=^$current_setting_name = \").*(?=\")"
|
sed -n -E '\^\['"$current_section_name"'\]^,\^\^'"$current_setting_name"'|\[^{ \^\['"$current_section_name"'\]^! { \^\^'"$current_setting_name"'^ p } }' $1 | grep -o -P "(?<=^$current_setting_name = \").*(?=\")"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ get_setting_value() {
|
||||||
if [[ -z $current_section_name ]]; then
|
if [[ -z $current_section_name ]]; then
|
||||||
echo $(grep -o -P "(?<=^$current_setting_name = ).*" $1)
|
echo $(grep -o -P "(?<=^$current_setting_name = ).*" $1)
|
||||||
else
|
else
|
||||||
sed -n '\^\['"$current_section_name"'\]^,\^\^'"$current_setting_name"'^{ \^\['"$current_section_name"'\]^! { \^\^'"$current_setting_name"'^ p } }' $1 | grep -o -P "(?<=^$current_setting_name = ).*"
|
sed -n -E '\^\['"$current_section_name"'\]^,\^\^'"$current_setting_name"'|\[^{ \^\['"$current_section_name"'\]^! { \^\^'"$current_setting_name"'^ p } }' $1 | grep -o -P "(?<=^$current_setting_name = ).*"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
|
@ -24,16 +24,18 @@ change_preset_dialog() {
|
||||||
elif [[ "$system_value" == "false" ]]; then
|
elif [[ "$system_value" == "false" ]]; then
|
||||||
current_disabled_systems=("${current_disabled_systems[@]}" "$system_name")
|
current_disabled_systems=("${current_disabled_systems[@]}" "$system_name")
|
||||||
fi
|
fi
|
||||||
current_preset_settings=("${current_preset_settings[@]}" "$system_value" "$system_name")
|
current_preset_settings=("${current_preset_settings[@]}" "$system_value" "$(make_name_pretty $system_name)" "$system_name")
|
||||||
done < <(printf '%s\n' "$section_results")
|
done < <(printf '%s\n' "$section_results")
|
||||||
|
|
||||||
choice=$(zenity \
|
choice=$(zenity \
|
||||||
--list --width=1200 --height=720 \
|
--list --width=1200 --height=720 \
|
||||||
--checklist \
|
--checklist \
|
||||||
--separator="," \
|
--separator="," \
|
||||||
|
--hide-column=3 --print-column=3 \
|
||||||
--text="Enable $pretty_preset_name:" \
|
--text="Enable $pretty_preset_name:" \
|
||||||
--column "Enabled" \
|
--column "Enabled" \
|
||||||
--column "Emulator" \
|
--column "Emulator" \
|
||||||
|
--column "internal_system_name" \
|
||||||
"${current_preset_settings[@]}")
|
"${current_preset_settings[@]}")
|
||||||
|
|
||||||
local rc=$?
|
local rc=$?
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 78786102fc04cf104ef9bf2f0ebcacbdda357ae0
|
Subproject commit 0b1cfb79e591e10488a3262d6b38db843c39a409
|
|
@ -1 +1 @@
|
||||||
Subproject commit 50314360ded6fa3b9f0b602513b1164b7a6636ed
|
Subproject commit a2441b964afefd8cd1cebcdf562c7878670daf42
|
Loading…
Reference in a new issue