Ignore:
Timestamp:
Feb 23, 2012, 12:13:33 AM (13 years ago)
Author:
shl
Message:

Add additioned ACPI support for battery and temperature monitoring
Code from David Azarewicz

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/branch-1-0/src/helpers/apmh.c

    r184 r406  
    9999    HFILE hfAPMSys = NULLHANDLE;
    100100    ULONG ulAction;
     101    PAPM papm;
    101102
    102103    if (!(arc = DosOpen("\\DEV\\APM$",
     
    121122                              getpowerinfo.usParmLength)))
    122123        {
    123             PAPM papm;
    124             if (!(papm = NEW(APM)))
    125                 arc = ERROR_NOT_ENOUGH_MEMORY;
    126             else
     124            // @@changed V1.0.9 (2012-02-20) [slevine]: reworked to use caller's buffer if passed
     125            // Code from David Azarewicz
     126            if (*ppApm==NULL)
     127            {
     128                if (!(papm = NEW(APM))) arc = ERROR_NOT_ENOUGH_MEMORY;
     129                *ppApm = papm;
     130            }
     131            if (*ppApm)
    127132            {
    128133                ZERO(papm);
Note: See TracChangeset for help on using the changeset viewer.