diff -Naur openvr-1.0.15-orig/samples/driver_sample/driverlog.cpp openvr-1.0.15/samples/driver_sample/driverlog.cpp
--- openvr-1.0.15-orig/samples/driver_sample/driverlog.cpp	2018-05-11 21:56:31.000000000 +0300
+++ openvr-1.0.15/samples/driver_sample/driverlog.cpp	2018-05-15 14:46:06.400751700 +0300
@@ -7,7 +7,7 @@
 
 static vr::IVRDriverLog * s_pLogFile = NULL;
 
-#if !defined( WIN32)
+#if !defined(_WIN32)
 #define vsnprintf_s vsnprintf
 #endif
 
diff -Naur openvr-1.0.15-orig/samples/shared/pathtools.cpp openvr-1.0.15/samples/shared/pathtools.cpp
--- openvr-1.0.15-orig/samples/shared/pathtools.cpp	2018-05-11 21:56:31.000000000 +0300
+++ openvr-1.0.15/samples/shared/pathtools.cpp	2018-05-15 14:47:17.742077200 +0300
@@ -396,7 +396,7 @@
 std::string Path_GetThisModulePath()
 {
 	// gets the path of vrclient.dll itself
-#ifdef WIN32
+#ifdef _WIN32
 	HMODULE hmodule = NULL;
 
 	::GetModuleHandleEx( GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, reinterpret_cast<LPCTSTR>(Path_GetThisModulePath), &hmodule );
@@ -735,7 +735,7 @@
 }
 
 
-#if defined(WIN32)
+#if defined(_WIN32)
 #define FILE_URL_PREFIX "file:///"
 #else
 #define FILE_URL_PREFIX "file://"
diff -Naur openvr-1.0.15-orig/src/openvr_api_public.cpp openvr-1.0.15/src/openvr_api_public.cpp
--- openvr-1.0.15-orig/src/openvr_api_public.cpp	2018-05-15 14:41:23.196253000 +0300
+++ openvr-1.0.15/src/openvr_api_public.cpp	2018-05-15 14:41:25.863857600 +0300
@@ -118,7 +118,7 @@
 		return vr::VRInitError_Init_InstallationCorrupt;
 	}
 
-#if defined( WIN64 )
+#if defined( _WIN64 )
 	std::string sDLLPath = Path_Join( sTestPath, "vrclient_x64" DYNAMIC_LIB_EXT );
 #else
 	std::string sDLLPath = Path_Join( sTestPath, "vrclient" DYNAMIC_LIB_EXT );
diff -Naur openvr-1.0.15-orig/src/vrcommon/dirtools_public.cpp openvr-1.0.15/src/vrcommon/dirtools_public.cpp
--- openvr-1.0.15-orig/src/vrcommon/dirtools_public.cpp	2018-05-11 21:56:31.000000000 +0300
+++ openvr-1.0.15/src/vrcommon/dirtools_public.cpp	2018-05-15 14:48:20.174187100 +0300
@@ -79,7 +79,7 @@
 //-----------------------------------------------------------------------------
 bool BCreateDirectory( const char *pchPath )
 {
-#ifdef WIN32
+#ifdef _WIN32
 	std::wstring wPath = UTF8to16( pchPath );
 	if ( ::CreateDirectoryW( wPath.c_str(), NULL ) )
 		return true;
diff -Naur openvr-1.0.15-orig/src/vrcommon/pathtools_public.cpp openvr-1.0.15/src/vrcommon/pathtools_public.cpp
--- openvr-1.0.15-orig/src/vrcommon/pathtools_public.cpp	2018-05-11 21:56:31.000000000 +0300
+++ openvr-1.0.15/src/vrcommon/pathtools_public.cpp	2018-05-15 14:50:10.529780900 +0300
@@ -167,7 +167,7 @@
 	if( sPath.empty() )
 		return false;
 
-#if defined( WIN32 )
+#if defined( _WIN32 )
 	if ( sPath.size() < 3 ) // must be c:\x or \\x at least
 		return false;
 
@@ -395,7 +395,7 @@
 std::string Path_GetThisModulePath()
 {
 	// gets the path of vrclient.dll itself
-#ifdef WIN32
+#ifdef _WIN32
 	HMODULE hmodule = NULL;
 
 	::GetModuleHandleEx( GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, reinterpret_cast<LPCTSTR>(Path_GetThisModulePath), &hmodule );
@@ -480,7 +480,7 @@
 	if( sFixedPath.empty() )
 		return false;
 
-#if defined( WIN32 )
+#if defined( _WIN32 )
 	struct	_stat	buf;
 	std::wstring wsFixedPath = UTF8to16( sFixedPath.c_str() );
 	if ( _wstat( wsFixedPath.c_str(), &buf ) == -1 )
@@ -735,7 +735,7 @@
 }
 
 
-#if defined(WIN32)
+#if defined(_WIN32)
 #define FILE_URL_PREFIX "file:///"
 #else
 #define FILE_URL_PREFIX "file://"
@@ -784,7 +784,7 @@
 // -----------------------------------------------------------------------------------------------------
 std::string GetUserDocumentsPath()
 {
-#if defined( WIN32 )
+#if defined( _WIN32 )
 	WCHAR rwchPath[MAX_PATH];
 
 	if ( !SUCCEEDED( SHGetFolderPathW( NULL, CSIDL_MYDOCUMENTS | CSIDL_FLAG_CREATE, NULL, 0, rwchPath ) ) )
diff -Naur openvr-1.0.15-orig/src/vrcommon/pathtools_public.h openvr-1.0.15/src/vrcommon/pathtools_public.h
--- openvr-1.0.15-orig/src/vrcommon/pathtools_public.h	2018-05-15 14:44:25.779974300 +0300
+++ openvr-1.0.15/src/vrcommon/pathtools_public.h	2018-05-15 14:41:50.480700900 +0300
@@ -106,7 +106,7 @@
 #endif
 
 //-----------------------------------------------------------------------------
-#if defined(WIN32)
+#if defined(_WIN32)
 #define DYNAMIC_LIB_EXT	".dll"
 #define PROGRAM_EXT ".exe"
 #ifdef _WIN64
diff -Naur openvr-1.0.15-orig/src/vrcommon/vrpathregistry_public.cpp openvr-1.0.15/src/vrcommon/vrpathregistry_public.cpp
--- openvr-1.0.15-orig/src/vrcommon/vrpathregistry_public.cpp	2018-05-11 21:56:31.000000000 +0300
+++ openvr-1.0.15/src/vrcommon/vrpathregistry_public.cpp	2018-05-15 14:51:02.415472100 +0300
@@ -7,7 +7,7 @@
 #include "strtools_public.h"
 #include "dirtools_public.h"
 
-#if defined( WIN32 )
+#if defined( _WIN32 )
 #include <windows.h>
 #include <shlobj.h>
 
@@ -25,7 +25,7 @@
 #ifndef VRLog
 	#if defined( __MINGW32__ )
 		#define VRLog(args...)		fprintf(stderr, args)
-	#elif defined( WIN32 )
+	#elif defined( _WIN32 )
 		#define VRLog(fmt, ...)		fprintf(stderr, fmt, __VA_ARGS__)
 	#else
 		#define VRLog(args...)		fprintf(stderr, args)
@@ -35,7 +35,7 @@
 /** Returns the root of the directory the system wants us to store user config data in */
 static std::string GetAppSettingsPath()
 {
-#if defined( WIN32 )
+#if defined( _WIN32 )
 	WCHAR rwchPath[MAX_PATH];
 
 	if( !SUCCEEDED( SHGetFolderPathW( NULL, CSIDL_LOCAL_APPDATA | CSIDL_FLAG_CREATE, NULL, 0, rwchPath ) ) )
