Fixed some typos and added a couple of includes. All were need to get SDL_power to compile on Linux.
authorBob Pendleton <bob@pendleton.com>
Mon, 08 Jun 2009 19:24:38 +0000
changeset 3174c8b9c6d27476
parent 3173 510e3f36c04a
child 3175 e6c113f1ea43
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
src/power/linux/SDL_syspower.c
     1.1 --- a/src/power/SDL_power.c	Sun Jun 07 22:44:59 2009 +0000
     1.2 +++ b/src/power/SDL_power.c	Mon Jun 08 19:24:38 2009 +0000
     1.3 @@ -30,7 +30,7 @@
     1.4  (*SDL_GetPowerInfo_Impl)(SDL_PowerState *state, int *seconds, int *percent);
     1.5  
     1.6  SDL_bool SDL_GetPowerInfo_Linux_sys_power(SDL_PowerState*, int*, int*);
     1.7 -SDL_bool SDL_GetPowerInfo_Linux_proc_apci(SDL_PowerState*, int*, int*);
     1.8 +SDL_bool SDL_GetPowerInfo_Linux_proc_acpi(SDL_PowerState*, int*, int*);
     1.9  SDL_bool SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState*, int*, int*);
    1.10  SDL_bool SDL_GetPowerInfo_Windows(SDL_PowerState*, int*, int*);
    1.11  SDL_bool SDL_GetPowerInfo_MacOSX(SDL_PowerState*, int*, int*);
    1.12 @@ -57,7 +57,7 @@
    1.13  #ifndef SDL_POWER_DISABLED
    1.14  #ifdef SDL_POWER_LINUX /* in order of preference. More than could work. */
    1.15      SDL_GetPowerInfo_Linux_sys_power,
    1.16 -    SDL_GetPowerInfo_Linux_proc_apci,
    1.17 +    SDL_GetPowerInfo_Linux_proc_acpi,
    1.18      SDL_GetPowerInfo_Linux_proc_apm,
    1.19  #endif
    1.20  #ifdef SDL_POWER_WINDOWS /* handles Win32, Win64, PocketPC. */
     2.1 --- a/src/power/linux/SDL_syspower.c	Sun Jun 07 22:44:59 2009 +0000
     2.2 +++ b/src/power/linux/SDL_syspower.c	Mon Jun 08 19:24:38 2009 +0000
     2.3 @@ -27,6 +27,10 @@
     2.4  #include <stdio.h>
     2.5  #include <unistd.h>
     2.6  
     2.7 +#include <sys/types.h>
     2.8 +#include <sys/stat.h>
     2.9 +#include <fcntl.h>
    2.10 +
    2.11  #include "SDL_power.h"
    2.12  
    2.13  SDL_bool
    2.14 @@ -44,8 +48,8 @@
    2.15  }
    2.16  
    2.17  SDL_bool
    2.18 -SDL_GetPowerInfo_Linux_sys_proc_acpi(SDL_PowerState *state,
    2.19 -                                     int *seconds, int *percent)
    2.20 +SDL_GetPowerInfo_Linux_proc_acpi(SDL_PowerState *state,
    2.21 +				 int *seconds, int *percent)
    2.22  {
    2.23      return SDL_FALSE;  /* !!! FIXME: write me. */
    2.24  #if 0
    2.25 @@ -93,8 +97,8 @@
    2.26  
    2.27  /* http://lxr.linux.no/linux+v2.6.29/drivers/char/apm-emulation.c */
    2.28  SDL_bool
    2.29 -SDL_GetPowerInfo_Linux_sys_proc_apm(SDL_PowerState *state,
    2.30 -                                    int *seconds, int *percent)
    2.31 +SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState *state,
    2.32 +				int *seconds, int *percent)
    2.33  {
    2.34      SDL_bool need_details = SDL_FALSE;
    2.35      int ac_status = 0;