QueryPerformanceFrequency bugfix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch stops the demo of Settlers 4 crashing at startup.

ChangeLog:
Add some traces
A Mhz is 1000Hz, not 100000

Index: win32/newfns.c
===================================================================
RCS file: /home/wine/wine/win32/newfns.c,v
retrieving revision 1.47
diff -u -r1.47 newfns.c
--- win32/newfns.c	22 May 2003 03:41:27 -0000	1.47
+++ win32/newfns.c	29 Jun 2003 15:01:12 -0000
@@ -93,7 +93,7 @@
 		{
 		    if (sscanf( value, "%lf", &cpuMHz ) == 1)
 		    {
-			QUERYPERF_RDTSC_Frequency = (LONGLONG)(cpuMHz * 1000000.0);
+			QUERYPERF_RDTSC_Frequency = (LONGLONG)(cpuMHz * 1000.0);
 			QUERYPERF_RDTSC_Use = TRUE;
 			TRACE("using frequency: %lldHz\n", QUERYPERF_RDTSC_Frequency);
 			break;
@@ -147,12 +147,14 @@
     if (QUERYPERF_RDTSC_Use)
     {
 	frequency->QuadPart = QUERYPERF_RDTSC_Frequency;
+	TRACE("returning %lld\n", frequency->QuadPart);
 	return TRUE;
     }
 #endif
 
     frequency->s.LowPart	= 1000000;
     frequency->s.HighPart	= 0;
+    TRACE("returning %lld\n", QUERYPERF_RDTSC_Frequency);    
     return TRUE;
 }
 

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux