-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Use the libretro VFS interface in libretro builds #21092
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
base: master
Are you sure you want to change the base?
Conversation
|
That looks more complicated than I was expecting. Don't mind me just posting to get subscribed to notifications in the mobile GitHub interface |
|
It's because the original code depends on library functions that themselves use stdio functions in a few places. I rewrote them to be more agnostic of what file system API is being used.
The file_stream_transforms.h header file that redirects the remaining stdio calls made from directly inside of the PPSSPP codebase also doesn't like it when you write Also, I've consolidated the various platform-dependent methods of seeking files into |
|
Pretty impressive! Yeah, this is probably really the only way to go about it. I kicked off the CI. Will give it some light testing later before merge. |
|
As you can see in the CI reports, there are some build issues for non-libretro builds. |
|
Triggered a new build. Since this is your first PR, CI needs manual triggering. I'll try to keep up reasonably. |
|
Thanks for the fixes! Will do a final review tomorrow, I think we'll be able to get this in shortly. |
|
Running on Android, there seems to be some pointer truncation problem in the new libpng code: |
|
Actually, that's not the root cause. It just fails to load all pngs from assets on Android. Assets are read from the APK as a zip file, and something is wrong with that. pngLoadPtr does need |
|
Yeah, the zipfilereader is not functioning correctly, it reads garbled data. Not sure why. |
|
Same happens on standalone in Windows - the zipfilereader is busted. On Windows, we don't use the zipfilereader for assets, so the app starts. But if you try to install something from the homebrew store, it blows up. It's clear you didn't test this. |
The zip file will be closed automatically when the `ZipContainer` goes out of scope, or when `.close()` is called on the `ZipContainer`.
…ipContainer` constructor
|
Should be fixed for installing games from the homebrew store, but the Android app is still broken. I'm working on fixing that now. |
|
Okay, the non-libretro Android builds should work again. |
|
Hm. PPSSPP never really has any need to access 4GB+ files (as PSP ISOs are a lot smaller than that, even the largest "combined" ISOs like the Final Fantasy Type-0 translation). Combining fseek and lseek like that looks super scary, and I'm not sure if we shouldn't just do a plain old fseek there instead. |
|
Alright, I've changed that code path to use normal fseek and ftell. |
Allows, for example, loading games from the Storage Access Framework when using the libretro core in the RetroArch Android app.
I removed the duplicate header files in the libretro directory in this repository that are already present in libretro-common, by the way, because this pull request relies on libretro-common which in turn relies on libretro-common's versions of the duplicated header files. I see no reason to have two copies of the libretro-common header files anyways.