From: dabb Date: Tue, 21 Nov 2000 14:54:45 +0000 (+0000) Subject: Borland C++ compile fix - works/compiles now. X-Git-Tag: RELEASE_0_2_0_RC1~921 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=64c4623de94bb0d3f0efe02361f1e8368efb047d;p=xonotic%2Fdarkplaces.git Borland C++ compile fix - works/compiles now. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@99 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sys_win.c b/sys_win.c index 73b68aa2..e7013094 100644 --- a/sys_win.c +++ b/sys_win.c @@ -251,9 +251,14 @@ void Sys_Init (void) // get 32 out of the 64 time bits such that we have around // 1 microsecond resolution +#ifdef __BORLANDC__ + lowpart = (unsigned int)PerformanceFreq.u.LowPart; + highpart = (unsigned int)PerformanceFreq.u.HighPart; +#else lowpart = (unsigned int)PerformanceFreq.LowPart; highpart = (unsigned int)PerformanceFreq.HighPart; - lowshift = 0; +#endif + lowshift = 0; while (highpart || (lowpart > 2000000.0)) { @@ -412,9 +417,14 @@ double Sys_FloatTime (void) QueryPerformanceCounter (&PerformanceCount); +#ifdef __BORLANDC__ + temp = ((unsigned int)PerformanceCount.u.LowPart >> lowshift) | + ((unsigned int)PerformanceCount.u.HighPart << (32 - lowshift)); +#else + temp = ((unsigned int)PerformanceCount.LowPart >> lowshift) | ((unsigned int)PerformanceCount.HighPart << (32 - lowshift)); - +#endif if (first) { oldtime = temp;