libretro / vba-next

Optimized port of VBA-M to Libretro.
GNU General Public License v2.0
94 stars 88 forks source link

Use proper VFS version. #146

Closed mudlord closed 1 year ago

mudlord commented 1 year ago

VFS callbacks fail since it requires V2, which includes vfs_truncate. Otherwise it falls back to libretro-common code. Current VFS wrapping code in libretro-common needs V2 since vfs_truncate's callback is set.

https://github.com/libretro/libretro-common/blob/master/streams/file_stream.c#L65

Now VFS callbacks work properly in frontends that support them. Otherwise a hack of setting "cb->required_interface_version = 2" in frontend works. Only cores, according to specs, are meant to set the required version.