-
Notifications
You must be signed in to change notification settings - Fork 6
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
add m3u support #9
base: master
Are you sure you want to change the base?
Conversation
The code also advertises .cue support but it doesn't work yet, this is not from this pr, it happened before. Maybe elf doesn't work either because i removed the code handling it in the previous version of this PR (in the hope it had already been done and abstractred in CDVD because of the One way this isn't worse than the other PR is that it adds support for absolute paths in m3us, which was just a if away with the right Path function. I needed update because all my games playlists are in m3us with isos inside (or even cues for the few ps2 games using iso, like Growlanser III and IV). |
ebcae54
to
f9d72e3
Compare
I'm a bit confused about RETRO_ENVIRONMENT_SET_DISK_CONTROL_EXT_INTERFACE To clarify, it's used just in the case that we're in the same game game, so i should always start the image_index to 0 when in I thought it was supposed to remember between loads of a game, like it would get the variable from a frontend maintained 'memory' or from the playlist to see the last cd loaded and load that. So one could close a game on cd 2, loading another game, closing that and starting the original and start on cd 2. But apparently it's not so, and the only reason for those are just the restart option to remember the current game index. Worse than i expected, but not too bad. I was breaking the code in these last updates assuming that there was a hidden call before |
f955280
to
af65ea0
Compare
Seems like there is a cue RFE in upstream since 2021. I'm guessing it will get implemented when playing ps1 games gets serious. There is little point implementing it here if it's going to get added transparently, and yet, it's been 2 years. |
Ah damn, this isn't working because of utf-8 breaking. I'll have to see if it's possible without wxwidgets. |
Ok, i think i fixed the bugs. bug 1: the messages didn't have \n bug 2: ifstream utf-8 requires opening with a filesystem path library. I kept the BOM strip because it doesn't sound like it would do any harm. bug 3: i forgot to test for a empty parent when joining the files inside the m3u if relative to the 'parent' of the m3u. This is necessary because there is no way in the pcsx2 path library to 'absolutize' a path, and so i needed to treat relative paths inside m3us as if they were relative to the file, but the file could be passed from another directory than the current. bug 4: invalid use of rfind instead of find... for instance, |
Description of Changes
Updated version of the m3u code that works with current master code.
Rationale behind Changes
m3u pr required had a very old version of the code and used wxwidgets
Suggested Testing Steps
No clue.
I used fstream ifstream getline to get the m3u file data, not sure if the best idea and if libretro has some better idea. I'm also actually not sure if this will work with utf-8. I didn't have problems, but i don't have games with Japanese on it, maybe it's better to test a m3u with it.