diff options
Diffstat (limited to 'backends/platform/wince/CEDevice.cpp')
-rw-r--r-- | backends/platform/wince/CEDevice.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/backends/platform/wince/CEDevice.cpp b/backends/platform/wince/CEDevice.cpp index f90d5e2966..ffe2523b47 100644 --- a/backends/platform/wince/CEDevice.cpp +++ b/backends/platform/wince/CEDevice.cpp @@ -29,17 +29,17 @@ #include "backends/platform/wince/wince-sdl.h" -static void (WINAPI* _SHIdleTimerReset)(void) = NULL; -static HANDLE (WINAPI* _SetPowerRequirement)(PVOID,int,ULONG,PVOID,ULONG) = NULL; -static DWORD (WINAPI* _ReleasePowerRequirement)(HANDLE) = NULL; +static void (WINAPI *_SHIdleTimerReset)(void) = NULL; +static HANDLE(WINAPI *_SetPowerRequirement)(PVOID, int, ULONG, PVOID, ULONG) = NULL; +static DWORD (WINAPI *_ReleasePowerRequirement)(HANDLE) = NULL; static HANDLE _hPowerManagement = NULL; static DWORD _lastTime = 0; static DWORD REG_bat = 0, REG_ac = 0, REG_disp = 0, bat_timeout = 0; static bool REG_tampered = false; #ifdef __GNUC__ extern "C" void WINAPI SystemIdleTimerReset(void); -#define SPI_SETBATTERYIDLETIMEOUT 251 -#define SPI_GETBATTERYIDLETIMEOUT 252 +#define SPI_SETBATTERYIDLETIMEOUT 251 +#define SPI_GETBATTERYIDLETIMEOUT 252 #endif #define TIMER_TRIGGER 9000 @@ -70,7 +70,7 @@ DWORD CEDevice::reg_access(const TCHAR *key, const TCHAR *val, DWORD data) { void CEDevice::backlight_xchg() { HANDLE h; - REG_bat = reg_access(TEXT("ControlPanel\\BackLight"), (const TCHAR*)TEXT("BatteryTimeout"), REG_bat); + REG_bat = reg_access(TEXT("ControlPanel\\BackLight"), (const TCHAR *)TEXT("BatteryTimeout"), REG_bat); REG_ac = reg_access(TEXT("ControlPanel\\BackLight"), TEXT("ACTimeout"), REG_ac); REG_disp = reg_access(TEXT("ControlPanel\\Power"), TEXT("Display"), REG_disp); @@ -89,7 +89,7 @@ void CEDevice::init() { } dll = LoadLibrary(TEXT("coredll.dll")); if (dll) { - _SetPowerRequirement = (HANDLE (*)(PVOID,int,ULONG,PVOID,ULONG))GetProcAddress(dll, TEXT("SetPowerRequirement")); + _SetPowerRequirement = (HANDLE (*)(PVOID, int, ULONG, PVOID, ULONG))GetProcAddress(dll, TEXT("SetPowerRequirement")); _ReleasePowerRequirement = (DWORD (*)(HANDLE))GetProcAddress(dll, TEXT("ReleasePowerRequirement")); } if (_SetPowerRequirement) @@ -97,7 +97,7 @@ void CEDevice::init() { _lastTime = GetTickCount(); // older devices - REG_bat = REG_ac = REG_disp = 2 * 60 * 60 * 1000; // 2hrs should do it + REG_bat = REG_ac = REG_disp = 2 * 60 * 60 * 1000; // 2hrs should do it backlight_xchg(); REG_tampered = true; SystemParametersInfo(SPI_GETBATTERYIDLETIMEOUT, 0, (void *) &bat_timeout, 0); |