src/power/uikit/SDL_syspower.m
changeset 7191 75360622e65f
parent 6885 700f1b25f77f
child 7857 6388f5229bb7
     1.1 --- a/src/power/uikit/SDL_syspower.m	Sat May 18 12:48:50 2013 -0700
     1.2 +++ b/src/power/uikit/SDL_syspower.m	Sat May 18 14:17:52 2013 -0700
     1.3 @@ -30,7 +30,7 @@
     1.4  #include "SDL_assert.h"
     1.5  #include "SDL_syspower.h"
     1.6  
     1.7 -// turn off the battery monitor if it's been more than X ms since last check.
     1.8 +/* turn off the battery monitor if it's been more than X ms since last check. */
     1.9  static const int BATTERY_MONITORING_TIMEOUT = 3000;
    1.10  static Uint32 SDL_UIKitLastPowerInfoQuery = 0;
    1.11  
    1.12 @@ -41,7 +41,7 @@
    1.13          const Uint32 prev = SDL_UIKitLastPowerInfoQuery;
    1.14          const UInt32 now = SDL_GetTicks();
    1.15          const UInt32 ticks = now - prev;
    1.16 -        // if timer wrapped (now < prev), shut down, too.
    1.17 +        /* if timer wrapped (now < prev), shut down, too. */
    1.18          if ((now < prev) || (ticks >= BATTERY_MONITORING_TIMEOUT)) {
    1.19              UIDevice *uidev = [UIDevice currentDevice];
    1.20              SDL_assert([uidev isBatteryMonitoringEnabled] == YES);
    1.21 @@ -61,13 +61,14 @@
    1.22          [uidev setBatteryMonitoringEnabled:YES];
    1.23      }
    1.24  
    1.25 -    // UIKit_GL_SwapWindow() (etc) will check this and disable the battery
    1.26 -    //  monitoring if the app hasn't queried it in the last X seconds.
    1.27 -    //  Apparently monitoring the battery burns battery life.  :)
    1.28 -    //  Apple's docs say not to monitor the battery unless you need it.
    1.29 +    /* UIKit_GL_SwapWindow() (etc) will check this and disable the battery
    1.30 +     *  monitoring if the app hasn't queried it in the last X seconds.
    1.31 +     *  Apparently monitoring the battery burns battery life.  :)
    1.32 +     *  Apple's docs say not to monitor the battery unless you need it.
    1.33 +     */
    1.34      SDL_UIKitLastPowerInfoQuery = SDL_GetTicks();
    1.35  
    1.36 -    *seconds = -1;   // no API to estimate this in UIKit.
    1.37 +    *seconds = -1;   /* no API to estimate this in UIKit. */
    1.38  
    1.39      switch ([uidev batteryState])
    1.40      {