Fixed compiling on Windows Mobile SDK 5.0 with Visual Studio 2008

This commit is contained in:
Sam Lantinga
2011-01-24 15:46:11 -08:00
parent 5bb9535909
commit ec39fffe84
42 changed files with 1137 additions and 3437 deletions

View File

@@ -32,11 +32,20 @@
SDL_bool
SDL_GetPowerInfo_Windows(SDL_PowerState * state, int *seconds, int *percent)
{
#ifdef _WIN32_WCE
SYSTEM_POWER_STATUS_EX status;
#else
SYSTEM_POWER_STATUS status;
#endif
SDL_bool need_details = SDL_FALSE;
/* This API should exist back to Win95 and Windows CE. */
if (!GetSystemPowerStatus(&status)) {
#ifdef _WIN32_WCE
if (!GetSystemPowerStatusEx(&status, FALSE))
#else
if (!GetSystemPowerStatus(&status))
#endif
{
/* !!! FIXME: push GetLastError() into SDL_GetError() */
*state = SDL_POWERSTATE_UNKNOWN;
} else if (status.BatteryFlag == 0xFF) { /* unknown state */