Ok this is very odd, I did some extensive testing and the paths are always mapped correctly:
Test 1:
:\saves (directory is empty)
RetroArch: [libretro DEBUG] :: -cfg_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess\cfg
RetroArch: [libretro DEBUG] :: -nvram_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess
vram
RetroArch: [libretro DEBUG] :: -hiscore_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess\hi
RetroArch: [libretro DEBUG] :: -input_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess\input
RetroArch: [libretro DEBUG] :: -state_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess\states
RetroArch: [libretro DEBUG] :: -snapshot_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess\snaps
first run: not working
second run: not working
Test 2:
:\saves\ (directory is empty)
RetroArch: [libretro DEBUG] :: -cfg_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess\cfg
RetroArch: [libretro DEBUG] :: -nvram_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess
vram
RetroArch: [libretro DEBUG] :: -hiscore_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess\hi
RetroArch: [libretro DEBUG] :: -input_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess\input
RetroArch: [libretro DEBUG] :: -state_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess\states
RetroArch: [libretro DEBUG] :: -snapshot_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess\snaps
first run: not working
second run: working!
Odd! so I guess after closing the game MESS has to save the config so it creates the directories. Not sure why this works when the trailing slash is added though
[b]Test 3:
:\saves (directories exist up to the platform level)
D:\Emulators\RetroArch\saves\mess\states
es[/b]
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess\cfg
RetroArch: [libretro DEBUG] :: -nvram_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess
vram
RetroArch: [libretro DEBUG] :: -hiscore_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess\hi
RetroArch: [libretro DEBUG] :: -input_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess\input
RetroArch: [libretro DEBUG] :: -state_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess\states
RetroArch: [libretro DEBUG] :: -snapshot_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess\snaps
first run: not working
second run: not working
Test 4:
:\saves (directories exist up to the GAME level)
in this case D:\Emulators\RetroArch\saves\mess\states
es
estest
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess\cfg
RetroArch: [libretro DEBUG] :: -nvram_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess
vram
RetroArch: [libretro DEBUG] :: -hiscore_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess\hi
RetroArch: [libretro DEBUG] :: -input_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess\input
RetroArch: [libretro DEBUG] :: -state_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess\states
RetroArch: [libretro DEBUG] :: -snapshot_directory
RetroArch: [libretro DEBUG] :: D:\Emulators\RetroArch\saves\mess\snaps
first run: working
second run: working
Since it’s “working” I loaded a different game (tmnt4) and tried to save without restarting… FAILED. While the game was running I alt-tabbed and created snes mnt4j and it worked… so… IDK!!!
The paths are being passed correctly, and trailing slash or not the resulting path passed to the core is correct so unless RETRO_SAVE_DIRECTORY is returning some extraneous invisible character when \ is not set I don’t know what the problem could be.
I could forcefully add a trailing / or \ depending on the platform but I don’t know if that would work.
It would be interesting to have this tested under linux