Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed some typos and added a couple of includes. All were need to get…
Browse files Browse the repository at this point in the history
… SDL_power to compile on Linux.

Sam, you might want to check to see that the spellings I picked are the spellings you wanted.
  • Loading branch information
pendletonrc committed Jun 8, 2009
1 parent e93cafd commit 2216de1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/power/SDL_power.c
Expand Up @@ -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*);
Expand All @@ -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. */
Expand Down
12 changes: 8 additions & 4 deletions src/power/linux/SDL_syspower.c
Expand Up @@ -27,6 +27,10 @@
#include <stdio.h>
#include <unistd.h>

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

#include "SDL_power.h"

SDL_bool
Expand All @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 2216de1

Please sign in to comment.