libchdr: Use also fopen_utf8 here
authornegativeExponent <negativeExponent@users.noreply.github.com>
Fri, 23 Apr 2021 00:54:23 +0000 (08:54 +0800)
committernegativeExponent <negativeExponent@users.noreply.github.com>
Fri, 23 Apr 2021 00:54:35 +0000 (08:54 +0800)
RE: https://github.com/libretro/libretro-fceumm/issues/448

deps/libchdr/include/libchdr/coretypes.h

index 30f892f..fc3f1d1 100644 (file)
@@ -21,7 +21,12 @@ typedef int16_t INT16;
 typedef int8_t INT8;
 
 #define core_file FILE
+#ifdef HAVE_LIBRETRO
+#include <compat/fopen_utf8.h>
+#define core_fopen(file) fopen_utf8(file, "rb")
+#else
 #define core_fopen(file) fopen(file, "rb")
+#endif
 #if defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WIN64__)
        #define core_fseek _fseeki64
        #define core_ftell _ftelli64