]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys_shared.c
fix a display issue with warpzone decals I caused in my last change
[xonotic/darkplaces.git] / sys_shared.c
index 2ae309c12e06b3f8b1e70e35f5f728efa181b340..e9211f424ac9c86d282200045aba41e571c807ef 100644 (file)
@@ -3,12 +3,13 @@
 #define SUPPORTDLL
 
 #ifdef WIN32
+# ifdef _WIN64
+#  define _WIN32_WINNT 0x0502
+   // for SetDllDirectory
+# endif
 # include <windows.h>
 # include <mmsystem.h> // timeGetTime
 # include <time.h> // localtime
-#ifdef _MSC_VER
-#pragma comment(lib, "winmm.lib")
-#endif
 #else
 # include <unistd.h>
 # include <fcntl.h>
@@ -127,7 +128,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