fix: read RetroArch's config under XDG_CONFIG_HOME

Native RetroArch on Linux keeps retroarch.cfg under $XDG_CONFIG_HOME/retroarch when the variable is set, and falls back to ~/.retroarch.cfg (file_path_special.c fill_pathname_application_data, configuration.c open_default_config_file at e98e1da0). Detection read ~/.config/retroarch only.
This commit is contained in:
Abdessamad Derraz committed 2026-11-06 08:18:59 +01:00
1 parent 19898cb6ea
commit 97d0a478d2
7 files changed
+104 -18

No files matched your search

+13
View File
@@ -219,10 +219,23 @@ platforms:
method: config_file
config: $HOME/snap/retroarch/current/.config/retroarch/retroarch.cfg
parse_key: system_directory
# Native: $XDG_CONFIG_HOME/retroarch when the variable is set, else
# $HOME/.config/retroarch, then $HOME/.retroarch.cfg when that file is
# missing (file_path_special.c fill_pathname_application_data,
# configuration.c open_default_config_file). A value left at default
# is the system folder of the first of the two folders.
- os: linux
method: config_file
config: $XDG_CONFIG_HOME/retroarch/retroarch.cfg
parse_key: system_directory
- os: linux
method: config_file
config: $HOME/.config/retroarch/retroarch.cfg
parse_key: system_directory
- os: linux
method: config_file
config: $HOME/.retroarch.cfg
parse_key: system_directory
# configuration.c reads <Application Support>/RetroArch/config, and a value
# left at default is ~/Documents/RetroArch/system (platform_darwin.m).
# Older builds kept the file one level up.