FEATURES: migrated pretty system names

This commit is contained in:
XargonWan 2024-08-09 16:42:31 +09:00
parent 66509f07f5
commit a96e6940ad
5 changed files with 15 additions and 45 deletions

View file

@ -271,6 +271,9 @@
"dreamcast": {
"name": "Sega Dreamcast"
},
"dc": {
"name": "Sega Dreamcast"
},
"easyrpg": {
"name": "EasyRPG Game Engine"
},
@ -310,6 +313,9 @@
"gamegear": {
"name": "Sega Game Gear"
},
"gg": {
"name": "Sega Game Gear"
},
"gb": {
"name": "Nintendo Game Boy"
},

View file

@ -1,23 +0,0 @@
cemu^Cemu (Nintendo Wii U Standalone Emulator)
citra^Citra (Nintendo 3DS Standalone Emulator, via Ponzu)
dolphin^Dolphin (Nintendo GameCube / Wii Standalone Emulator)
duckstation^Duckstation (Sony Playstation Standalone Emulator)
gb^Nintendo GameBoy
gba^Nintendo GameBoy Advance
gbc^Nintendo GameBoy Color
genesis^Sega Genesis/Master System
gg^Sega GameGear
mame^MAME (Multi-Arcade Machine Standalone Emulator)
melonds^MelonDS (Nintendo DS Standalone Emulator)
n64^Nintendo 64
pcsx2^PCSX2 (Sony Playstation 2 Standalone Emulator)
ppsspp^PPSSPP (Sony PSP Standalone Emulator)
primehack^Primehack (Metroid Prime Standalone Emulator)
psx_ra^Sony Playstation (RetroArch Core)
retroarch^RetroArch (Multi-emulator Frontend)
rpcs3^RPCS3 (Sony Playstation 3 Standalone Emulator)
ryujinx^Ryujinx (Nintendo Switch Standalone Emulator)
snes^Nintendo Super Nintendo
vita3k^Vita3K (Sony PSVita Standalone Emulator)
xemu^XEMU (Microsoft Xbox Standalone Emulator)
yuzu^Yuzu (Nintendo Switch Standalone Emulator, via Ponzu)

View file

@ -1,15 +0,0 @@
cemu^/app/bin/Cemu-wrapper
citra^/var/data/ponzu/Citra/bin/citra-qt
dolphin^/app/bin/dolphin-emu
duckstation^/app/bin/duckstation-qt
mame^/app/bin/mame
melonds^/app/bin/melonds
pcsx2^/app/bin/pcsx2-qt
ppsspp^/app/bin/PPSSPPSDL
primehack^/app/bin/primehack-wrapper
retroarch^/app/bin/retroarch
rpcs3^/app/bin/rpcs3
ryujinx^/app/bin/Ryujinx.sh
vita3k^/app/bin/Vita3K
xemu^/app/bin/xemu
yuzu^/var/data/ponzu/Yuzu/bin/yuzu

View file

@ -34,6 +34,7 @@ finit_options_list="$config/retrodeck/reference_lists/finit_options_list.cfg"
splashscreen_dir="/var/config/ES-DE/resources/graphics/extra_splashes" # The default location of extra splash screens
current_splash_file="/var/config/ES-DE/resources/graphics/splash.svg" # The active splash file that will be shown on boot
default_splash_file="/var/config/ES-DE/resources/graphics/splash-orig.svg" # The default RetroDECK splash screen
# TODO: instead of this maybe we can iterate the features.json
multi_user_emulator_config_dirs="$config/retrodeck/reference_lists/multi_user_emulator_config_dirs.cfg" # A list of emulator config folders that can be safely linked/unlinked entirely in multi-user mode
rd_es_themes="/app/share/es-de/themes" # The directory where themes packaged with RetroDECK are stored
lockfile="/var/config/retrodeck/.lock" # Where the lockfile is located
@ -49,7 +50,6 @@ rd_appdata="/app/share/appdata/net.retrodeck.retrodeck.appdata.xml"
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
presets_dir="$config/retrodeck/presets" # Repository for all system preset config files
pretty_system_names_reference_list="$config/retrodeck/reference_lists/pretty_system_names.cfg" # An internal translation list for turning internal names (eg. gbc) to "pretty" names (Nintendo GameBoy Color)
git_organization_name="RetroDECK" # The name of the organization in our git repository such as GitHub
cooker_repository_name="Cooker" # The name of the cooker repository under RetroDECK organization
features="$config/retrodeck/reference_lists/features.json" # A file where all the RetroDECK and component capabilities are kept for querying

View file

@ -322,16 +322,18 @@ backup_retrodeck_userdata() {
make_name_pretty() {
# This function will take an internal system name (like "gbc") and return a pretty version for user display ("Nintendo GameBoy Color")
# If the name is nout found it only returns the short name such as "gbc"
# USAGE: make_name_pretty "system name"
local system=$(grep "$1^" "$pretty_system_names_reference_list")
if [[ ! -z "$system" ]]; then
IFS='^' read -r internal_name pretty_name < <(echo "$system")
else
pretty_name="$1"
fi
local system_name="$1"
# Use jq to parse the JSON and find the pretty name
local pretty_name=$(jq -r --arg name "$system_name" '.system[$name].name // $name' "$features")
echo "$pretty_name"
}
finit_browse() {
# Function for choosing data directory location during first/forced init
path_selected=false