# HG changeset patch # User Ryan C. Gordon # Date 1246343228 0 # Node ID 65fdb0961d7cd521902b44b7d758158a40bdb444 # Parent f735edf338d3061f2e385e93344f884f0f5db303 Moved hardcoding of "/proc/apm" elsewhere. diff -r f735edf338d3 -r 65fdb0961d7c src/power/linux/SDL_syspower.c --- a/src/power/linux/SDL_syspower.c Tue Jun 30 06:26:02 2009 +0000 +++ b/src/power/linux/SDL_syspower.c Tue Jun 30 06:27:08 2009 +0000 @@ -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 @@ 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;