Commit graph

7 commits

Author SHA1 Message Date
刘皓
c85e9554ec
Implement writing to filesystem (i.e. game saving) in libretro builds
Files are written to the libretro save directory, which is mounted at
/save in PhysFS. All filesystem calls made from Ruby in libretro builds
are routed through PhysFS, so the game can just use any ordinary
filesystem function provided by Ruby to interact with /save.

It's also union mounted on top of the game directory (located at /game
in PhysFS) so that games that write their save files to the current
working directory will have their save files saved to the libretro save
directory instead of the game directory.

For security and portability reasons, nothing outside of the libretro
save directory can be written to, and nothing outside of the libretro
save directory, the libretro game directory and the various embedded
files used by the runtime can be read from.
2025-05-07 16:01:41 -04:00
刘皓
8457ac1598
Rename mkxp-threads to mkxp-polyfill 2025-04-02 13:06:17 -04:00
刘皓
c25175778e
Prevent PhysFS from using lstat() on platforms where it's not supported 2025-03-07 12:10:26 -05:00
刘皓
fc26ac927b
Add a pthreads shim for libretro builds on platforms without pthreads 2025-02-20 12:49:36 -05:00
刘皓
1706584e9d
Split patch files for libretro builds into smaller files 2025-02-03 23:55:44 -05:00
刘皓
973b33e3e5
Fix PhysFS compilation errors in libretro builds 2025-01-25 00:58:11 -05:00
刘皓
a44f3b16b3
Add SDL headers and PhysFS to libretro builds
I don't think I'll be needing SDL. Pretty sure about 100% of the
functionality of SDL that's currently being used here is either trivial
to reimplement or needs to be replaced for the libretro core to work in
the first place. For example, I already know I'm going to need to
completely replace the SDL input handling with libretro's input API.
Also, I'll need to get rid of the use of SDL threads in the audio code
later because libretro cores need to render audio synchronously with the
video rendering.

I'm including the SDL headers, though, to reduce the number of
compilation errors.
2025-01-24 23:56:00 -05:00