]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys_shared.c
show more detail in "has no triangles" and "has no vertexes" warning
[xonotic/darkplaces.git] / sys_shared.c
index 2ae309c12e06b3f8b1e70e35f5f728efa181b340..695f34651893c63047cff347ec83e4bc1421d767 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
@@ -222,8 +234,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