]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys_shared.c
fix MSVC2008 compilation again
[xonotic/darkplaces.git] / sys_shared.c
index 2ae309c12e06b3f8b1e70e35f5f728efa181b340..dd00b48b01cafcaced429677d894d6ba41c22fc2 100644 (file)
@@ -3,6 +3,12 @@
 #define SUPPORTDLL
 
 #ifdef WIN32
+# ifdef _WIN64
+#  ifndef _WIN32_WINNT
+#   define _WIN32_WINNT 0x0502
+#  endif
+   // for SetDllDirectory
+# endif
 # include <windows.h>
 # include <mmsystem.h> // timeGetTime
 # include <time.h> // localtime
@@ -127,7 +133,13 @@ notfound:
        {
                Con_DPrintf (" \"%s\"", dllnames[i]);
 #ifdef WIN32
+# ifdef _WIN64
+               SetDllDirectory("bin64");
+# endif
                dllhandle = LoadLibrary (dllnames[i]);
+# ifdef _WIN64
+               SetDllDirectory(NULL);
+# endif
 #else
                dllhandle = dlopen (dllnames[i], RTLD_LAZY | RTLD_GLOBAL);
 #endif