From d49cffe3f5b374bd009d9396208e2f8b2d8b8daa Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Sat, 15 Feb 2014 20:14:40 +0100 Subject: [PATCH] Buildfix --- Common/FileUtil.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Common/FileUtil.cpp b/Common/FileUtil.cpp index 2cbb3a8bff..6756bbc653 100644 --- a/Common/FileUtil.cpp +++ b/Common/FileUtil.cpp @@ -135,7 +135,9 @@ bool Exists(const std::string &filename) { // Make sure Windows will no longer handle critical errors, which means no annoying "No disk" dialog // Save the old error mode +#ifdef _WIN32 int OldMode = SetErrorMode(SEM_FAILCRITICALERRORS); +#endif struct stat64 file_info; #if defined(_WIN32) && defined(UNICODE) @@ -151,7 +153,9 @@ bool Exists(const std::string &filename) #endif // Set the old error mode +#ifdef _WIN32 SetErrorMode(OldMode); +#endif return (result == 0); }