From 981e2a2f3c223efd83bcf6243db2980467079562 Mon Sep 17 00:00:00 2001 From: Wanne Date: Wed, 11 Apr 2012 10:15:30 +0000 Subject: [PATCH] - Initialize windows timer to lowest possible value during timer initialization (by tazpn) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5185 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Utils/Timer Control.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Utils/Timer Control.cpp b/Utils/Timer Control.cpp index 4b5ec7e7..4405b237 100644 --- a/Utils/Timer Control.cpp +++ b/Utils/Timer Control.cpp @@ -363,6 +363,8 @@ BOOLEAN InitializeJA2Clock() DebugMsg( TOPIC_JA2, DBG_LEVEL_3, "Could not get performance frequency"); } + timeBeginPeriod(gtc.wPeriodMin); + InitializeCriticalSection(&gcsNotifyLock); if (IsHiSpeedClockMode()) @@ -420,6 +422,8 @@ void ShutdownJA2Clock(void) timeKillEvent( gTimerID ); #endif } + + timeEndPeriod(gtc.wPeriodMin); }