ROMReader.cpp: Fix compiling on non-Windows systems. (Regression from commit 12c9323.)

This commit is contained in:
rogerman 2018-09-22 13:41:28 -07:00
parent 12c93232b9
commit a857e0e65c
1 changed files with 7 additions and 2 deletions

View File

@ -87,8 +87,13 @@ void* STDROMReaderInit(const char* filename)
if ((sb.st_mode & S_IFMT) != S_IFREG)
return 0;
#endif
#ifdef WIN32
FILE* inf = _wfopen(mbstowcs((std::string)filename).c_str(),L"rb");
#else
FILE* inf = fopen(filename, "rb");
#endif
if(!inf) return NULL;
STDROMReaderData* ret = new STDROMReaderData();
@ -366,4 +371,4 @@ ROMReader_struct * MemROMReaderRead_TrueInit(void* buf, int length)
mem.len = length;
mem.pos = 0;
return &MemROMReader;
}
}