diff --git a/src/boards/copyfami_hwi.c b/src/boards/copyfami_hwi.c index 72a05af..7660c61 100644 --- a/src/boards/copyfami_hwi.c +++ b/src/boards/copyfami_hwi.c @@ -173,7 +173,7 @@ static int32 FetchNewCHRBank(int32 slot) { CHR1KGetCmd[1] = slot << 2; SENDGET(CHR1KGetCmd, chr_data.buf[bank * 1024], 1024); sprintf(name, "%04x.chr", bank); - ofile = fopen(name, "wb"); + ofile = FCEUD_UTF8fopen(name, "wb"); fwrite((void*)&chr_data.buf[bank * 1024], 1, 1024, ofile); fclose(ofile); return bank; @@ -186,7 +186,7 @@ static int32 FetchNewPRGBank(int32 slot) { PRG8KGetCmd[1] = 0x80 + (slot << 5); SENDGET(PRG8KGetCmd, prg_data.buf[bank * 8192], 8192); sprintf(name, "%04x.prg", bank); - ofile = fopen(name, "wb"); + ofile = FCEUD_UTF8fopen(name, "wb"); fwrite((void*)&prg_data.buf[bank * 8192], 1, 8192, ofile); fclose(ofile); return bank; diff --git a/src/drivers/libretro/libretro.c b/src/drivers/libretro/libretro.c index 8c606fd..ebc86b4 100644 --- a/src/drivers/libretro/libretro.c +++ b/src/drivers/libretro/libretro.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -291,7 +292,7 @@ void FCEUD_SoundToggle (void) FILE *FCEUD_UTF8fopen(const char *n, const char *m) { if (n) - return fopen(n, m); + return fopen_utf8(n, m); return NULL; } diff --git a/src/file.c b/src/file.c index fc05ea1..b210e18 100644 --- a/src/file.c +++ b/src/file.c @@ -34,12 +34,6 @@ #include "driver.h" #include "general.h" -#include "compat/fopen_utf8.h" - -#ifndef __GNUC__ - #define strcasecmp strcmp -#endif - static MEMWRAP *MakeMemWrap(void *tz, int type) { MEMWRAP *tmp; @@ -87,7 +81,7 @@ FCEUFILE * FCEU_fopen(const char *path, const char *ipsfn, fceufp->fp = MakeMemWrapBuffer(buffer, bufsize); else { - void *t = fopen_utf8(path, mode); + void *t = FCEUD_UTF8fopen(path, mode); if (!t) {