From 790619529c225e8bb8905127220cdae657e77df0 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 30 Jun 2009 06:27:08 +0000 Subject: [PATCH] Moved hardcoding of "/proc/apm" elsewhere. --- src/power/linux/SDL_syspower.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/power/linux/SDL_syspower.c b/src/power/linux/SDL_syspower.c index b1390bbb6..b90f4bfad 100644 --- a/src/power/linux/SDL_syspower.c +++ b/src/power/linux/SDL_syspower.c @@ -34,6 +34,7 @@ #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_ac_adapter_path = "/proc/acpi/ac_adapter"; @@ -333,7 +334,7 @@ SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState * state, int battery_flag = 0; int battery_percent = 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 *ptr = &buf[0]; char *str = NULL;