Ignore:
Timestamp:
Oct 18, 2001, 11:06:02 PM (24 years ago)
Author:
umoeller
Message:

misc changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/apmh.c

    r105 r111  
    219219}
    220220
    221 
     221/*
     222 *@@ apmhHasBattery:
     223 *      quick'n'dirty helper which returns TRUE only
     224 *      if APM is supported on the system and the
     225 *      system actually has a battery (i.e. is a laptop).
     226 *
     227 *@@added V0.9.16 (2001-10-15) [umoeller]
     228 */
     229
     230BOOL apmhHasBattery(VOID)
     231{
     232    BOOL brc = FALSE;
     233
     234    PAPM p = NULL;
     235    if (!apmhOpen(&p))
     236    {
     237        if (!apmhReadStatus(p, NULL))
     238            brc = (p->ulBatteryStatus != 0xFF);
     239
     240        apmhClose(&p);
     241    }
     242
     243    return brc;
     244}
Note: See TracChangeset for help on using the changeset viewer.