X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3032b7b5c2d19764e4e7f3b50a5f727cbbaccc45..f458d4dd6b69c4a9e94ef956673ae8e463677a27:/src/msw/power.cpp

diff --git a/src/msw/power.cpp b/src/msw/power.cpp
index 022e624dad..e6b74936a2 100644
--- a/src/msw/power.cpp
+++ b/src/msw/power.cpp
@@ -28,6 +28,17 @@
 #endif //WX_PRECOMP
 
 #include "wx/power.h"
+#include "wx/msw/private.h"
+
+#if !defined(__WINCE_STANDARDSDK__)
+
+#ifdef __WXWINCE__
+    typedef SYSTEM_POWER_STATUS_EX SYSTEM_POWER_STATUS;
+    BOOL GetSystemPowerStatus(SYSTEM_POWER_STATUS *status)
+    {
+        return GetSystemPowerStatusEx(status, TRUE);
+    }
+#endif
 
 // ----------------------------------------------------------------------------
 // helper functions
@@ -44,12 +55,15 @@ static inline bool wxGetPowerStatus(SYSTEM_POWER_STATUS *sps)
     return true;
 }
 
+#endif
+
 // ============================================================================
 // implementation
 // ============================================================================
 
 wxPowerType wxGetPowerType()
 {
+#if !defined(__WINCE_STANDARDSDK__)
     SYSTEM_POWER_STATUS sps;
     if ( wxGetPowerStatus(&sps) )
     {
@@ -67,12 +81,14 @@ wxPowerType wxGetPowerType()
                 break;
         }
     }
+#endif
 
     return wxPOWER_UNKNOWN;
 }
 
 wxBatteryState wxGetBatteryState()
 {
+#if !defined(__WINCE_STANDARDSDK__)
     SYSTEM_POWER_STATUS sps;
     if ( wxGetPowerStatus(&sps) )
     {
@@ -90,8 +106,7 @@ wxBatteryState wxGetBatteryState()
                 return wxBATTERY_CRITICAL_STATE;
         }
     }
+#endif
 
     return wxBATTERY_UNKNOWN_STATE;
 }
-
-