diff src/timer/win32/SDL_systimer.c @ 1668:4da1ee79c9af SDL-1.3

more tweaking indent options
author Sam Lantinga <slouken@libsdl.org>
date Mon, 29 May 2006 04:04:35 +0000
parents 782fd950bd46
children
line wrap: on
line diff
--- a/src/timer/win32/SDL_systimer.c	Mon May 29 03:53:21 2006 +0000
+++ b/src/timer/win32/SDL_systimer.c	Mon May 29 04:04:35 2006 +0000
@@ -49,28 +49,28 @@
 #endif
 
 void
-SDL_StartTicks (void)
+SDL_StartTicks(void)
 {
     /* Set first ticks value */
 #ifdef USE_GETTICKCOUNT
-    start = GetTickCount ();
+    start = GetTickCount();
 #else
 #if 0                           /* Apparently there are problems with QPC on Win2K */
-    if (QueryPerformanceFrequency (&hires_ticks_per_second) == TRUE) {
+    if (QueryPerformanceFrequency(&hires_ticks_per_second) == TRUE) {
         hires_timer_available = TRUE;
-        QueryPerformanceCounter (&hires_start_ticks);
+        QueryPerformanceCounter(&hires_start_ticks);
     } else
 #endif
     {
         hires_timer_available = FALSE;
-        timeBeginPeriod (1);    /* use 1 ms timer precision */
-        start = timeGetTime ();
+        timeBeginPeriod(1);     /* use 1 ms timer precision */
+        start = timeGetTime();
     }
 #endif
 }
 
 Uint32
-SDL_GetTicks (void)
+SDL_GetTicks(void)
 {
     DWORD now, ticks;
 #ifndef USE_GETTICKCOUNT
@@ -78,10 +78,10 @@
 #endif
 
 #ifdef USE_GETTICKCOUNT
-    now = GetTickCount ();
+    now = GetTickCount();
 #else
     if (hires_timer_available) {
-        QueryPerformanceCounter (&hires_now);
+        QueryPerformanceCounter(&hires_now);
 
         hires_now.QuadPart -= hires_start_ticks.QuadPart;
         hires_now.QuadPart *= 1000;
@@ -89,7 +89,7 @@
 
         return (DWORD) hires_now.QuadPart;
     } else {
-        now = timeGetTime ();
+        now = timeGetTime();
     }
 #endif
 
@@ -102,61 +102,61 @@
 }
 
 void
-SDL_Delay (Uint32 ms)
+SDL_Delay(Uint32 ms)
 {
-    Sleep (ms);
+    Sleep(ms);
 }
 
 /* Data to handle a single periodic alarm */
 static UINT timerID = 0;
 
 static void CALLBACK
-HandleAlarm (UINT uID, UINT uMsg, DWORD_PTR dwUser,
-             DWORD_PTR dw1, DWORD_PTR dw2)
+HandleAlarm(UINT uID, UINT uMsg, DWORD_PTR dwUser,
+            DWORD_PTR dw1, DWORD_PTR dw2)
 {
-    SDL_ThreadedTimerCheck ();
+    SDL_ThreadedTimerCheck();
 }
 
 
 int
-SDL_SYS_TimerInit (void)
+SDL_SYS_TimerInit(void)
 {
     MMRESULT result;
 
     /* Set timer resolution */
-    result = timeBeginPeriod (TIMER_RESOLUTION);
+    result = timeBeginPeriod(TIMER_RESOLUTION);
     if (result != TIMERR_NOERROR) {
-        SDL_SetError ("Warning: Can't set %d ms timer resolution",
-                      TIMER_RESOLUTION);
+        SDL_SetError("Warning: Can't set %d ms timer resolution",
+                     TIMER_RESOLUTION);
     }
     /* Allow 10 ms of drift so we don't chew on CPU */
     timerID =
-        timeSetEvent (TIMER_RESOLUTION, 1, HandleAlarm, 0, TIME_PERIODIC);
+        timeSetEvent(TIMER_RESOLUTION, 1, HandleAlarm, 0, TIME_PERIODIC);
     if (!timerID) {
-        SDL_SetError ("timeSetEvent() failed");
+        SDL_SetError("timeSetEvent() failed");
         return (-1);
     }
-    return (SDL_SetTimerThreaded (1));
+    return (SDL_SetTimerThreaded(1));
 }
 
 void
-SDL_SYS_TimerQuit (void)
+SDL_SYS_TimerQuit(void)
 {
     if (timerID) {
-        timeKillEvent (timerID);
+        timeKillEvent(timerID);
     }
-    timeEndPeriod (TIMER_RESOLUTION);
+    timeEndPeriod(TIMER_RESOLUTION);
 }
 
 int
-SDL_SYS_StartTimer (void)
+SDL_SYS_StartTimer(void)
 {
-    SDL_SetError ("Internal logic error: Win32 uses threaded timer");
+    SDL_SetError("Internal logic error: Win32 uses threaded timer");
     return (-1);
 }
 
 void
-SDL_SYS_StopTimer (void)
+SDL_SYS_StopTimer(void)
 {
     return;
 }