--appendconfig failing with two config files

Good afternoon (at least here)

I’m experiencing a problem with --appendconfig in RetroArch (v1.3.6Compiler: GCC (4.8.4) 64-bitBuilt: Jul 18 2016 for Linux) when I try to use two configuration files. If I only use one:

retroarch -L "/usr/lib/libretro/genesis_plus_gx_libretro.so" "/home/mc/emulation/data/megadrive/roms/Sonic The Hedgehog 3 (USA).zip" --appendconfig "/home/mc/Retroarch/configs/main.cfg" -v

Everything works fine. But as soon as I try to add a second one:

retroarch -L "/usr/lib/libretro/genesis_plus_gx_libretro.so" "/home/mc/emulation/data/megadrive/roms/Sonic The Hedgehog 3 (USA).zip" --appendconfig "/home/mc/Retroarch/configs/main.cfg,/home/mc/Retroarch/configs/sys_megadrive.cfg" -v

…none of them work and I got this error message:

Config: failed to append config "/home/mc/Retroarch/configs/main.cfg,/home/mc/Retroarch/configs/sys_megadrive.cfg"

I’ve tried different things in the second file, leaving it empty (totally empty), adding just a comment (with # at the beginning of the line), adding just a valid parameter (custom_viewport_y = “300”) and nothing seems to work. It’s not a permission problem since the configuration files are in the same location and they have the same permissions:

-rwxr--r-- 1 mc mc 9223 Aug 14 18:13 main.cfg
-rwxr--r-- 1 mc mc    0 Aug 14 18:16 sys_megadrive.cfg

Any idea about what’s going on? is it a bug or am I missing something?

Regards and thanks in advanced.

PS. I’ve also tried using “;” to join two configuration files with the same result.

Typical, you are desperate, you search for help… and 5 minutes later you figure out the problem :smiley:

It seems the documentation of retroarch is a bit outdated. In some places it’s indicated the separation character for multiple files in -appendconfig is “,” (comma), but actually it is “|”.

In line 628 of https://github.com/RetroPie/RetroPie-Setup/blob/aedbc8e8b26ba3715ceb63580bd3e1c71f04e125/scriptmodules/supplementary/runcommand/runcommand.sh#L628 you can see:


if [[ -f "$rom.cfg" ]]; then
    conf+="'|'\"$rom.cfg\""
fi

and in line ~260 of https://github.com/libretro/RetroArch/blob/aa2af0b61f10358447f96bf38f68085f7ef278f7/retroarch.c#L260 , the same[TABLE=“class: highlight tab-size js-file-line-container”]

[/TABLE] So I gave it a try and so far it seems to work.

Cheers