From 9b33859c68697a4cee83d54a7ceab6007454674d Mon Sep 17 00:00:00 2001 From: zeromus Date: Sat, 14 May 2016 05:00:39 +0000 Subject: [PATCH] fix a bug making vs2015 builds unable to open roms on XP systems --- desmume/src/ROMReader.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/desmume/src/ROMReader.cpp b/desmume/src/ROMReader.cpp index e6b8e43b8..778c50e60 100644 --- a/desmume/src/ROMReader.cpp +++ b/desmume/src/ROMReader.cpp @@ -69,16 +69,14 @@ ROMReader_struct STDROMReader = void * STDROMReaderInit(const char * filename) { -#ifdef WIN32 - struct _stat sb; -#else +#ifndef _MSC_VER struct stat sb; -#endif if (stat(filename, &sb) == -1) return 0; if ((sb.st_mode & S_IFMT) != S_IFREG) return 0; +#endif return (void *) fopen(filename, "rb"); }