src/power/linux/SDL_syspower.c
changeset 3207 65fdb0961d7c
parent 3206 f735edf338d3
child 3697 f7b03b6838cb
     1.1 --- a/src/power/linux/SDL_syspower.c	Tue Jun 30 06:26:02 2009 +0000
     1.2 +++ b/src/power/linux/SDL_syspower.c	Tue Jun 30 06:27:08 2009 +0000
     1.3 @@ -34,6 +34,7 @@
     1.4  
     1.5  #include "SDL_power.h"
     1.6  
     1.7 +static const char *proc_apm_path = "/proc/apm";
     1.8  static const char *proc_acpi_battery_path = "/proc/acpi/battery";
     1.9  static const char *proc_acpi_ac_adapter_path = "/proc/acpi/ac_adapter";
    1.10  
    1.11 @@ -333,7 +334,7 @@
    1.12      int battery_flag = 0;
    1.13      int battery_percent = 0;
    1.14      int battery_time = 0;
    1.15 -    const int fd = open("/proc/apm", O_RDONLY);
    1.16 +    const int fd = open(proc_apm_path, O_RDONLY);
    1.17      char buf[128];
    1.18      char *ptr = &buf[0];
    1.19      char *str = NULL;