Hans Leidekker : kernel32: Improve the GetSystemPowerStatus stub.

Alexandre Julliard julliard at winehq.org
Thu May 28 09:39:46 CDT 2009


Module: wine
Branch: master
Commit: 7797bc07148d00b49b5e0919c06f0e53548aaf0a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7797bc07148d00b49b5e0919c06f0e53548aaf0a

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Thu May 28 15:01:47 2009 +0200

kernel32: Improve the GetSystemPowerStatus stub.

---

 dlls/kernel32/powermgnt.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/dlls/kernel32/powermgnt.c b/dlls/kernel32/powermgnt.c
index 9236d8f..8d41044 100644
--- a/dlls/kernel32/powermgnt.c
+++ b/dlls/kernel32/powermgnt.c
@@ -37,10 +37,21 @@ BOOL WINAPI GetDevicePowerState(HANDLE hDevice, BOOL* pfOn)
 /***********************************************************************
  *           GetSystemPowerStatus      (KERNEL32.@)
  */
-BOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS sps_ptr)
+BOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS ps)
 {
-    WARN("(): stub, harmless.\n");
-    return FALSE;   /* no power management support */
+    WARN("(%p): stub, harmless.\n", ps);
+
+    if (ps)
+    {
+        ps->ACLineStatus        = 255;
+        ps->BatteryFlag         = 255;
+        ps->BatteryLifePercent  = 255;
+        ps->Reserved1           = 0;
+        ps->BatteryLifeTime     = ~0u;
+        ps->BatteryFullLifeTime = ~0u;
+        return TRUE;
+    }
+    return FALSE;
 }
 
 /***********************************************************************




More information about the wine-cvs mailing list