changeset 6551:c930dffac92c

Fix after the patch of Dominik Mierzejewski. Try the user's input.conf before the global one.
author albeu
date Mon, 24 Jun 2002 12:17:23 +0000
parents 991e03ca5ceb
children 3237a39563a1
files input/input.c
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/input/input.c	Mon Jun 24 11:51:55 2002 +0000
+++ b/input/input.c	Mon Jun 24 12:17:23 2002 +0000
@@ -298,7 +298,7 @@
 static unsigned int ar_delay = 100, ar_rate = 8, last_ar = 0;
 
 static int use_joystick = 1, use_lirc = 1;
-static char* config_file = CONFDIR"/input.conf";
+static char* config_file = "input.conf";
 
 static char* js_dev = NULL;
 
@@ -1250,8 +1250,12 @@
   if(!file)
     return;
   
-  if(! mp_input_parse_config(file))
-    mp_msg(MSGT_INPUT,MSGL_WARN,"Falling back on default (hardcoded) input config\n");
+  if(! mp_input_parse_config(file)) {
+    // Try global conf dir
+    file = CONFDIR"/input.conf";
+    if(! mp_input_parse_config(file))
+      mp_msg(MSGT_INPUT,MSGL_WARN,"Falling back on default (hardcoded) input config\n");
+  }
 
 #ifdef HAVE_JOYSTICK
   if(use_joystick) {