From 9d83ba595803a33116e35cfec3c33f740eda807f Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 2 May 2013 16:54:03 -0700 Subject: [PATCH] QueryPerformanceCounter() is reliable these days, and setting the timer frequency higher can have adverse power consequences. http://msdn.microsoft.com/en-us/library/windows/desktop/dd757624%28v=vs.85%29.aspx --- src/timer/windows/SDL_systimer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/timer/windows/SDL_systimer.c b/src/timer/windows/SDL_systimer.c index efab3a1f4..9d1711b96 100644 --- a/src/timer/windows/SDL_systimer.c +++ b/src/timer/windows/SDL_systimer.c @@ -48,13 +48,13 @@ SDL_StartTicks(void) #ifdef USE_GETTICKCOUNT start = GetTickCount(); #else -#if 0 /* Apparently there are problems with QPC on Win2K */ + /* QueryPerformanceCounter has had problems in the past, but lots of games + use it, so we'll rely on it here. + */ if (QueryPerformanceFrequency(&hires_ticks_per_second) == TRUE) { hires_timer_available = TRUE; QueryPerformanceCounter(&hires_start_ticks); - } else -#endif - { + } else { hires_timer_available = FALSE; timeBeginPeriod(1); /* use 1 ms timer precision */ start = timeGetTime();