kernel32: Improve the GetSystemPowerStatus stub.

This commit is contained in:
Hans Leidekker 2009-05-28 15:01:47 +02:00 committed by Alexandre Julliard
parent 75ba56f066
commit 7797bc0714

View File

@ -37,10 +37,21 @@ BOOL WINAPI GetDevicePowerState(HANDLE hDevice, BOOL* pfOn)
/*********************************************************************** /***********************************************************************
* GetSystemPowerStatus (KERNEL32.@) * GetSystemPowerStatus (KERNEL32.@)
*/ */
BOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS sps_ptr) BOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS ps)
{ {
WARN("(): stub, harmless.\n"); WARN("(%p): stub, harmless.\n", ps);
return FALSE; /* no power management support */
if (ps)
{
ps->ACLineStatus = 255;
ps->BatteryFlag = 255;
ps->BatteryLifePercent = 255;
ps->Reserved1 = 0;
ps->BatteryLifeTime = ~0u;
ps->BatteryFullLifeTime = ~0u;
return TRUE;
}
return FALSE;
} }
/*********************************************************************** /***********************************************************************