#include "SDL_config.h"
#include "SDL_power.h"
Go to the source code of this file.
|
SDL_PowerState | SDL_GetPowerInfo (int *seconds, int *percent) |
| Get the current power supply details. More...
|
|
SDL_bool | SDL_GetPowerInfo_Android (SDL_PowerState *, int *, int *) |
|
SDL_bool | SDL_GetPowerInfo_BeOS (SDL_PowerState *, int *, int *) |
|
SDL_bool | SDL_GetPowerInfo_Linux_proc_acpi (SDL_PowerState *, int *, int *) |
|
SDL_bool | SDL_GetPowerInfo_Linux_proc_apm (SDL_PowerState *, int *, int *) |
|
SDL_bool | SDL_GetPowerInfo_MacOSX (SDL_PowerState *, int *, int *) |
|
SDL_bool | SDL_GetPowerInfo_PSP (SDL_PowerState *, int *, int *) |
|
SDL_bool | SDL_GetPowerInfo_UIKit (SDL_PowerState *, int *, int *) |
|
SDL_bool | SDL_GetPowerInfo_Windows (SDL_PowerState *, int *, int *) |
|
Get the current power supply details.
- Parameters
-
secs | Seconds of battery life left. You can pass a NULL here if you don't care. Will return -1 if we can't determine a value, or we're not running on a battery. |
pct | Percentage of battery life left, between 0 and 100. You can pass a NULL here if you don't care. Will return -1 if we can't determine a value, or we're not running on a battery. |
- Returns
- The state of the battery (if any).
Definition at line 88 of file SDL_power.c.
References i, implementations, NULL, and SDL_POWERSTATE_UNKNOWN.