[][src]Function fermium::power::SDL_GetPowerInfo

pub unsafe extern "C" fn SDL_GetPowerInfo(
    secs: *mut c_int,
    pct: *mut c_int
) -> SDL_PowerState

Get the current power supply details.

  • 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 if 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 if we're not running on a battery.

Returns: The state of the battery (if any).