From 5cd116d3ad723e1917f23f4b7584a27233f05cea Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Mon, 31 Jan 2011 20:32:00 +0000 Subject: [PATCH] Only adjust timer resolution for clients --- code/sys/sys_win32.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/sys/sys_win32.c b/code/sys/sys_win32.c index 76a1cecc..f0b1cc85 100644 --- a/code/sys/sys_win32.c +++ b/code/sys/sys_win32.c @@ -41,7 +41,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // Used to determine where to store user-specific files static char homePath[ MAX_OSPATH ] = { 0 }; +#ifndef DEDICATED static UINT timerResolution = 0; +#endif #ifdef __WIN64__ void Sys_SnapVector( float *v ) @@ -698,10 +700,10 @@ Windows specific initialisation */ void Sys_PlatformInit( void ) { +#ifndef DEDICATED TIMECAPS ptc; UINT res; -#ifndef DEDICATED const char *SDL_VIDEODRIVER = getenv( "SDL_VIDEODRIVER" ); if( SDL_VIDEODRIVER ) @@ -712,7 +714,6 @@ void Sys_PlatformInit( void ) } else SDL_VIDEODRIVER_externallySet = qfalse; -#endif if(timeGetDevCaps(&ptc, sizeof(ptc)) == MMSYSERR_NOERROR) { @@ -728,6 +729,7 @@ void Sys_PlatformInit( void ) } else timerResolution = 0; +#endif } /* @@ -739,8 +741,10 @@ Windows specific initialisation */ void Sys_PlatformExit( void ) { +#ifndef DEDICATED if(timerResolution) timeEndPeriod(timerResolution); +#endif } /*