소스 검색

Reverted the busywait code because of unpredictable effect on slower machines.

Lasse Öörni 14 년 전
부모
커밋
a7daef9b49
2개의 변경된 파일0개의 추가작업 그리고 8개의 파일을 삭제
  1. 0 6
      Engine/Engine/Engine.cpp
  2. 0 2
      Engine/Engine/Engine.h

+ 0 - 6
Engine/Engine/Engine.cpp

@@ -432,12 +432,6 @@ void Engine::ApplyFrameLimit()
                 unsigned sleepTime = (unsigned)((targetMax - timeAcc) / 1000LL);
                 Time::Sleep(sleepTime);
             }
-            else if (targetMax - timeAcc >= 20LL)
-            {
-                // Hack: calling QueryPerformanceCounter() too often leads to lost time. Perform a dummy calculation instead
-                for (int i = 0; i < 4096; ++i)
-                    waitResult_ = SDBMHash(waitResult_, i & 255);
-            }
             else
                 break;
         }

+ 0 - 2
Engine/Engine/Engine.h

@@ -100,8 +100,6 @@ private:
     unsigned maxFps_;
     /// Maximum frames per second when the application is inactive.
     unsigned maxInactiveFps_;
-    /// Dummy calculation result for frame limiter spinwait loop.
-    unsigned waitResult_;
     /// Initialized flag.
     bool initialized_;
     /// Exiting flag.