Closed irixxxx closed 2 years ago
The macros core_fseek and core_ftell are defined in a way that libretro VFS support is broken. Here is a patch that would solve this:
core_fseek
core_ftell
index c8ec622..338a0f0 100644 --- a/include/libchdr/coretypes.h +++ b/include/libchdr/coretypes.h @@ -31,7 +31,11 @@ typedef int8_t INT8; #define core_file FILE #define core_fopen(file) fopen(file, "rb") -#if defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WIN64__) + +#if defined USE_LIBRETRO_VFS + #define core_fseek fseek + #define core_ftell ftell +#elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WIN64__) #define core_fseek _fseeki64 #define core_ftell _ftelli64 #elif defined(_LARGEFILE_SOURCE) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64```
Thanks !
I created a PR for this. I guess this is superfluous here now.
The macros
core_fseek
andcore_ftell
are defined in a way that libretro VFS support is broken. Here is a patch that would solve this: