Browse Source

Fixed to correctly use Time::Sleep() instead of Sleep().

Lasse Öörni 12 years ago
parent
commit
d1c547d455

+ 2 - 1
Source/Engine/Graphics/Direct3D9/D3D9Graphics.cpp

@@ -49,6 +49,7 @@
 #include "TerrainPatch.h"
 #include "Texture2D.h"
 #include "TextureCube.h"
+#include "Timer.h"
 #include "VertexBuffer.h"
 #include "VertexDeclaration.h"
 #include "Zone.h"
@@ -570,7 +571,7 @@ bool Graphics::BeginFrame()
         // The device can not be reset yet, sleep and try again eventually
         if (hr == D3DERR_DEVICELOST)
         {
-            Sleep(20);
+            Time::Sleep(20);
             return false;
         }
         // The device is lost, but ready to be reset. Reset device but do not render on this frame yet

+ 2 - 1
Source/Engine/Network/HttpRequest.cpp

@@ -25,6 +25,7 @@
 #include "Log.h"
 #include "Profiler.h"
 #include "StringUtils.h"
+#include "Timer.h"
 
 #include <civetweb.h>
 
@@ -156,7 +157,7 @@ void HttpRequest::ThreadFunction()
                 break;
             
             mutex_.Release();
-            Sleep(5);
+            Time::Sleep(5);
             mutex_.Acquire();
         }