Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rubenjavier opened this issue Apr 11, 2018 · 3 comments

Comments

@rubenjavier
Copy link

Hello everyone, Im not really sure where to report this issue, maybe with some luck @jrassa will see it here.

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

@rubenjavier
Copy link
Author

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

@HerbFargus
Copy link
Owner

Boost was removed. This was discussed in the ES dev threads, a simple find and replace on the slashes should suffice as a workaround.

@rubenjavier
Copy link
Author

Thanks @HerbFargus , didnt't knew about the boost removal, you are right the find and replace should suffice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants