fix a bug making vs2015 builds unable to open roms on XP systems
This commit is contained in:
parent
45b559eae6
commit
9b33859c68
|
@ -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");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue