fix a bug making vs2015 builds unable to open roms on XP systems

This commit is contained in:
zeromus 2016-05-14 05:00:39 +00:00
parent 45b559eae6
commit 9b33859c68
1 changed files with 2 additions and 4 deletions

View File

@ -69,16 +69,14 @@ ROMReader_struct STDROMReader =
void * STDROMReaderInit(const char * filename) void * STDROMReaderInit(const char * filename)
{ {
#ifdef WIN32 #ifndef _MSC_VER
struct _stat sb;
#else
struct stat sb; struct stat sb;
#endif
if (stat(filename, &sb) == -1) if (stat(filename, &sb) == -1)
return 0; return 0;
if ((sb.st_mode & S_IFMT) != S_IFREG) if ((sb.st_mode & S_IFMT) != S_IFREG)
return 0; return 0;
#endif
return (void *) fopen(filename, "rb"); return (void *) fopen(filename, "rb");
} }