From 2216de1f8179b36cdf221b95b3ac5f746070ae82 Mon Sep 17 00:00:00 2001 From: Bob Pendleton Date: Mon, 8 Jun 2009 19:24:38 +0000 Subject: [PATCH] Fixed some typos and added a couple of includes. All were need to get SDL_power to compile on Linux. Sam, you might want to check to see that the spellings I picked are the spellings you wanted. --- src/power/SDL_power.c | 4 ++-- src/power/linux/SDL_syspower.c | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/power/SDL_power.c b/src/power/SDL_power.c index d22df1cd6..60a1d178a 100644 --- a/src/power/SDL_power.c +++ b/src/power/SDL_power.c @@ -30,7 +30,7 @@ typedef SDL_bool (*SDL_GetPowerInfo_Impl)(SDL_PowerState *state, int *seconds, int *percent); SDL_bool SDL_GetPowerInfo_Linux_sys_power(SDL_PowerState*, int*, int*); -SDL_bool SDL_GetPowerInfo_Linux_proc_apci(SDL_PowerState*, int*, int*); +SDL_bool SDL_GetPowerInfo_Linux_proc_acpi(SDL_PowerState*, int*, int*); SDL_bool SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState*, int*, int*); SDL_bool SDL_GetPowerInfo_Windows(SDL_PowerState*, int*, int*); SDL_bool SDL_GetPowerInfo_MacOSX(SDL_PowerState*, int*, int*); @@ -57,7 +57,7 @@ static SDL_GetPowerInfo_Impl implementations[] = { #ifndef SDL_POWER_DISABLED #ifdef SDL_POWER_LINUX /* in order of preference. More than could work. */ SDL_GetPowerInfo_Linux_sys_power, - SDL_GetPowerInfo_Linux_proc_apci, + SDL_GetPowerInfo_Linux_proc_acpi, SDL_GetPowerInfo_Linux_proc_apm, #endif #ifdef SDL_POWER_WINDOWS /* handles Win32, Win64, PocketPC. */ diff --git a/src/power/linux/SDL_syspower.c b/src/power/linux/SDL_syspower.c index 1852e9436..43f380c3d 100644 --- a/src/power/linux/SDL_syspower.c +++ b/src/power/linux/SDL_syspower.c @@ -27,6 +27,10 @@ #include #include +#include +#include +#include + #include "SDL_power.h" SDL_bool @@ -44,8 +48,8 @@ SDL_GetPowerInfo_Linux_sys_power(SDL_PowerState *state, } SDL_bool -SDL_GetPowerInfo_Linux_sys_proc_acpi(SDL_PowerState *state, - int *seconds, int *percent) +SDL_GetPowerInfo_Linux_proc_acpi(SDL_PowerState *state, + int *seconds, int *percent) { return SDL_FALSE; /* !!! FIXME: write me. */ #if 0 @@ -93,8 +97,8 @@ int_string(char *str, int *val) /* http://lxr.linux.no/linux+v2.6.29/drivers/char/apm-emulation.c */ SDL_bool -SDL_GetPowerInfo_Linux_sys_proc_apm(SDL_PowerState *state, - int *seconds, int *percent) +SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState *state, + int *seconds, int *percent) { SDL_bool need_details = SDL_FALSE; int ac_status = 0;