X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7325e21c4fda06b0f4a2ea5fd72169bae06a0d19..404b319a85dadd7decf7a5a5331020520031a41c:/src/msw/power.cpp diff --git a/src/msw/power.cpp b/src/msw/power.cpp index cf96885bbb..9b147e17dd 100644 --- a/src/msw/power.cpp +++ b/src/msw/power.cpp @@ -30,6 +30,16 @@ #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 // ---------------------------------------------------------------------------- @@ -38,19 +48,22 @@ static inline bool wxGetPowerStatus(SYSTEM_POWER_STATUS *sps) { if ( !::GetSystemPowerStatus(sps) ) { - wxLogLastError(_T("GetSystemPowerStatus()")); + wxLogLastError(wxT("GetSystemPowerStatus()")); return false; } return true; } +#endif + // ============================================================================ // implementation // ============================================================================ wxPowerType wxGetPowerType() { +#if !defined(__WINCE_STANDARDSDK__) SYSTEM_POWER_STATUS sps; if ( wxGetPowerStatus(&sps) ) { @@ -63,17 +76,19 @@ wxPowerType wxGetPowerType() return wxPOWER_SOCKET; default: - wxLogDebug(_T("Unknown ACLineStatus=%u"), sps.ACLineStatus); + wxLogDebug(wxT("Unknown ACLineStatus=%u"), sps.ACLineStatus); case 255: break; } } +#endif return wxPOWER_UNKNOWN; } wxBatteryState wxGetBatteryState() { +#if !defined(__WINCE_STANDARDSDK__) SYSTEM_POWER_STATUS sps; if ( wxGetPowerStatus(&sps) ) { @@ -91,8 +106,7 @@ wxBatteryState wxGetBatteryState() return wxBATTERY_CRITICAL_STATE; } } +#endif return wxBATTERY_UNKNOWN_STATE; } - -