Commit 6924cd9e authored by Ryan C. Gordon's avatar Ryan C. Gordon

Moved hardcoding of "/proc/apm" elsewhere.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403676
parent fc45904c
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "SDL_power.h" #include "SDL_power.h"
static const char *proc_apm_path = "/proc/apm";
static const char *proc_acpi_battery_path = "/proc/acpi/battery"; static const char *proc_acpi_battery_path = "/proc/acpi/battery";
static const char *proc_acpi_ac_adapter_path = "/proc/acpi/ac_adapter"; static const char *proc_acpi_ac_adapter_path = "/proc/acpi/ac_adapter";
...@@ -333,7 +334,7 @@ SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState * state, ...@@ -333,7 +334,7 @@ SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState * state,
int battery_flag = 0; int battery_flag = 0;
int battery_percent = 0; int battery_percent = 0;
int battery_time = 0; int battery_time = 0;
const int fd = open("/proc/apm", O_RDONLY); const int fd = open(proc_apm_path, O_RDONLY);
char buf[128]; char buf[128];
char *ptr = &buf[0]; char *ptr = &buf[0];
char *str = NULL; char *str = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment