jrassa / EmulationStation

This is primarily a dev/working repo. All PRs should be submitted upstream.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build of emulationstation's forward slashes not working with fbalpha_libretro.dll

rubenjavier opened this issue · comments

Hello.

This is all tested in windows 10 64bits and retroarch 1.7.1
as the title says, Portable Game Station with the emulationstation from march 12 https://github.com/jrassa/EmulationStation/releases is not working because even if the label have backward slashes, the lauch command writhes the path with forward slashes.
fbalpha_libretro.dll its the only core that is failing in my testing so far because of the slashes

this works:
C:\Portable-Game-Station.emulationstation\systems\retroarch\retroarch.exe -L C:\Portable-Game-Station.emulationstation\systems\retroarch\cores\fbalpha_libretro.dll M:\fba\mslug.zip

this does not work:
C:\Portable-Game-Station.emulationstation\systems\retroarch\retroarch.exe -L C:\Portable-Game-Station.emulationstation\systems\retroarch\cores\fbalpha_libretro.dll M:/fba/mslug.zip

I've tested nes, snes, atari, gb, gbc, mastersystem, megadrive, nds, n64 and those cores are working correctly with the forward slashes that emulationstation/Portable-Game-Station are forcing

Update:
For what I could find, its "%ROM_RAW%" not working correctly, in a post from 2015, ROM_RAW behaviour was changed to be able to write the slashes correctly according to the O.S. because VLC asked for this, but seems to be broken in this last version of emulationstation
https://emulationstation.org/news/?p=17

maybe something was changed in the emulationstation code because now all of the paths that show on the log have forward slashes an none have the O.S. backward slashes..
Also I have found that fbalpha_lobretro care only about the last slahs, the one just begore the rom name

this works:
C:\Portable-Game-Station>.emulationstation\systems\retroarch\retroarch.exe -L C:\Portable-Game-Station.emulationstation\systems\retroarch\cores\fbalpha_libretro.dll M:/fba\mslug.zip

this does not works:
C:\Portable-Game-Station>.emulationstation\systems\retroarch\retroarch.exe -L C:\Portable-Game-Station.emulationstation\systems\retroarch\cores\fbalpha_libretro.dll M:/fba/mslug.zip

Thanks in advance
best regards

Hello @jrassa
I think I've found whats missing,
int the 2015 version of emulationstation from Aloshi where the slashes where fixed (unstable branch), you can see that he uses an extra function called make_preferred() on the ROM_RAW string

https://github.com/Aloshi/EmulationStation/blob/unstable/es-app/src/SystemData.cpp
const std::string rom_raw = fs::path(game.getPath()).make_preferred().string();

He also uses this funcion on a windows ifdef on the same file
#ifdef WIN32
// windows escapes stuff by just putting everything in quotes
return '"' + fs::path(path).make_preferred().string() + '"';
#else

The function make_preferred() from Boost is the one that fixes the slashes
https://theboostcpplibraries.com/boost.filesystem-paths

Thanks in advance
Best regards

Updated info @jrassa, HerbFargus just told me that boost was removed, he proposes a find and replace on the slashes as a workaround for windows

Thanks in advance
Best regards

@rubenjavier sorry for not responding to your original issue over on the RetroPie github. I have a test build with a fix. Can you download and test it out and report back? Thanks.

https://ci.appveyor.com/project/jrassa/emulationstation/build/2.8.0-201854120354/job/y5qv6vcxg9hklu5d/artifacts

@jrassa dont worry and thanks for your efforts with the project, Im at work right now, but I'll test it later when I get home and get back to you
Thanks in advance
Best regards

@jrassa I've tested fba and every single emulator I have and this version is loading everyting, from Atari to GameCube.
Thanks a lot!