src/power/macosx/SDL_syspower.c
changeset 9600 d52c2129c9ac
parent 8149 681eb46b8ac4
child 9619 b94b6d0bff0f
equal deleted inserted replaced
9599:223fbcc6a327 9600:d52c2129c9ac
    21 #include "../../SDL_internal.h"
    21 #include "../../SDL_internal.h"
    22 
    22 
    23 #ifndef SDL_POWER_DISABLED
    23 #ifndef SDL_POWER_DISABLED
    24 #if SDL_POWER_MACOSX
    24 #if SDL_POWER_MACOSX
    25 
    25 
    26 #include <Carbon/Carbon.h>
    26 #include <CoreFoundation/CoreFoundation.h>
    27 #include <IOKit/ps/IOPowerSources.h>
    27 #include <IOKit/ps/IOPowerSources.h>
    28 #include <IOKit/ps/IOPSKeys.h>
    28 #include <IOKit/ps/IOPSKeys.h>
    29 
    29 
    30 #include "SDL_power.h"
    30 #include "SDL_power.h"
    31 
    31 
    32 /* Carbon is so verbose... */
    32 /* CoreFoundation is so verbose... */
    33 #define STRMATCH(a,b) (CFStringCompare(a, b, 0) == kCFCompareEqualTo)
    33 #define STRMATCH(a,b) (CFStringCompare(a, b, 0) == kCFCompareEqualTo)
    34 #define GETVAL(k,v) \
    34 #define GETVAL(k,v) \
    35     CFDictionaryGetValueIfPresent(dict, CFSTR(k), (const void **) v)
    35     CFDictionaryGetValueIfPresent(dict, CFSTR(k), (const void **) v)
    36 
    36 
    37 /* Note that AC power sources also include a laptop battery it is charging. */
    37 /* Note that AC power sources also include a laptop battery it is charging. */