Browse Source

*** empty log message ***

Dustin Barnard 18 years ago
parent
commit
483896eb49

+ 3 - 2
direct/src/directd/directd.cxx

@@ -171,7 +171,7 @@ DirectD::wait_for_servers(int count, int timeout_ms) {
     return true;
   }
   // The timeout is a rough estimate, we may wait slightly longer.
-  const wait_ms=200;
+  const int wait_ms=200;
   int cycles=timeout_ms/wait_ms;
   while (cycles--) {
     check_for_new_clients();
@@ -198,7 +198,8 @@ DirectD::wait_for_servers(int count, int timeout_ms) {
     }
 
     // Yield the timeslice before we poll again.
-    PR_Sleep(PR_MillisecondsToInterval(wait_ms));
+    //PR_Sleep(PR_MillisecondsToInterval(wait_ms));
+    Sleep(wait_ms);
   }
   // We've waited long enough, assume they're not going to be
   // ready in the time we want them:

+ 2 - 1
direct/src/directd/directd.h

@@ -17,13 +17,14 @@
 ////////////////////////////////////////////////////////////////////
 
 #include <process.h>
-#include <Windows.h>
 #include "pandabase.h"
 #include "directsymbols.h"
 #include "queuedConnectionManager.h"
 #include "queuedConnectionReader.h"
 #include "connectionWriter.h"
 #include "queuedConnectionListener.h"
+#include <windows.h>
+
 
 #ifdef CPPPARSER //[
 // hack for interrogate

+ 3 - 2
direct/src/directdServer/directdServer.cxx

@@ -68,7 +68,7 @@ DirectDServer::read_command(string& cmd) {
     ifstream f;
     f.open("directdCommand", ios::in | ios::binary);
     stringstream ss;
-    const buf_size=512;
+    const int buf_size=512;
     char buf[buf_size];
     f.getline(buf, buf_size);
     if (f.gcount() > 0) {
@@ -95,7 +95,8 @@ DirectDServer::run_server(int port) {
     check_for_datagrams();
 
     // Yield the timeslice before we poll again.
-    PR_Sleep(PR_MillisecondsToInterval(200));
+    //PR_Sleep(PR_MillisecondsToInterval(200));
+    Sleep(200);
   }
 }