From: beware Date: Mon, 6 Aug 2012 05:02:27 +0000 (+0000) Subject: fix incorrectly detecting NT6 ~64.102 Hz mode as NT5 64 Hz mode, detect as special... X-Git-Url: http://www.lcore.org/git/lcore.git/commitdiff_plain/c1aeb5145ef5940247379a3d5a1be00913c0b4b8 fix incorrectly detecting NT6 ~64.102 Hz mode as NT5 64 Hz mode, detect as special case git-svn-id: file:///svnroot/lcore/trunk@117 b1de8a11-f9be-4011-bde0-cc7ace90066a --- diff --git a/btime.pas b/btime.pas index ee7583b..7adcdd8 100644 --- a/btime.pas +++ b/btime.pas @@ -244,16 +244,30 @@ begin ticks_freq2 := f; mmtime_synchedqpc := false; { - NT 64 Hz + NT 5 64 Hz (RTC) identify mode as: nt64 QPC rate: either 3579545 or TSC freq QPC synched to gettickcount: no duration between 2 ticks is constant: yes gettickcount tick duration: 64 Hz + + NT 6 64 Hz (HPET?) + identify mode as: nt64 + QPC rate: TSC freq / 1000 + QPC synched to gettickcount: no + duration between 2 ticks is constant: yes + gettickcount tick duration: ~15.6001007 ms, ~64.102 Hz + } if (f >= 0.014) and (f <= 0.018) and isnt then begin + if (performancecountfreq = 3579545) or (performancecountfreq > 50000000) then begin + {typical XP} + ticks_freq := 1/64; + end else begin + {typical windows 7} + ticks_freq := 0.0156001007; + end; ticks_freq_known := true; - ticks_freq := 1/64; mmtime_synchedqpc := false; end; @@ -275,7 +289,7 @@ begin end; {9x} - if (performancecountfreq = 1193182) and (g >= 0.050) and (g <= 0.060) then begin + if (performancecountfreq = 1193182) and (f >= 0.050) and (f <= 0.060) then begin ticks_freq_known := true; ticks_freq := 65536 / (colorburst / 3); mmtime_synchedqpc := true;