]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys_shared.c
now that performance of cl_decals_newsystem is not terrible, enable it
[xonotic/darkplaces.git] / sys_shared.c
index 423e71748cb6ce96dcae15cbdf057918ebccedce..991c67c2b64c04c562a3d98c3a7777aca12031ac 100644 (file)
@@ -3,6 +3,10 @@
 #define SUPPORTDLL
 
 #ifdef WIN32
+# ifdef _WIN64
+#  define _WIN32_WINNT 0x0502
+   // for SetDllDirectory
+# endif
 # include <windows.h>
 # include <mmsystem.h> // timeGetTime
 # include <time.h> // localtime
@@ -124,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
@@ -219,8 +229,12 @@ void* Sys_GetProcAddress (dllhandle_t handle, const char* name)
 # define HAVE_GETTIMEOFDAY 1
 #endif
 
-#ifdef FD_SET
-# define HAVE_SELECT 1
+#ifndef WIN32
+// on Win32, select() cannot be used with all three FD list args being NULL according to MSDN
+// (so much for POSIX...)
+# ifdef FD_SET
+#  define HAVE_SELECT 1
+# endif
 #endif
 
 #ifndef WIN32