changeset 5722:8346974080fe

Added -input js-dev xx option to specifies the joystick device to use.
author albeu
date Sat, 20 Apr 2002 08:51:09 +0000
parents b53597b930b1
children 200b63734e47
files input/input.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/input/input.c	Sat Apr 20 07:02:36 2002 +0000
+++ b/input/input.c	Sat Apr 20 08:51:09 2002 +0000
@@ -292,6 +292,8 @@
 static int use_joystick = 1, use_lirc = 1;
 static char* config_file = "input.conf";
 
+static char* js_dev = NULL;
+
 static int mp_input_print_key_list(config_t* cfg);
 static int mp_input_print_cmd_list(config_t* cfg);
 
@@ -302,6 +304,7 @@
   { "ar-rate", &ar_rate, CONF_TYPE_INT, CONF_GLOBAL, 0, 0, NULL },
   { "keylist", mp_input_print_key_list, CONF_TYPE_FUNC, CONF_GLOBAL, 0, 0, NULL },
   { "cmdlist", mp_input_print_cmd_list, CONF_TYPE_FUNC, CONF_GLOBAL, 0, 0, NULL },
+  { "js-dev", &js_dev, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL },
   { NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
@@ -1235,7 +1238,7 @@
 
 #ifdef HAVE_JOYSTICK
   if(use_joystick) {
-    int fd = mp_input_joystick_init(NULL);
+    int fd = mp_input_joystick_init(js_dev);
     if(fd < 0)
       mp_msg(MSGT_INPUT,MSGL_ERR,"Can't init input joystick\n");
     else