summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authoralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-04-20 08:51:09 +0000
committeralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-04-20 08:51:09 +0000
commitdbbd2241adef1b08d6e9b8917b7182da1b0a4121 (patch)
tree1520356976624e9147a88fe84a211cdd24330545 /input
parent0b352877d74d08bdf7d9f516c88cb1edb8057590 (diff)
downloadmpv-dbbd2241adef1b08d6e9b8917b7182da1b0a4121.tar.bz2
mpv-dbbd2241adef1b08d6e9b8917b7182da1b0a4121.tar.xz
Added -input js-dev xx option to specifies the joystick device to use.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5723 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'input')
-rw-r--r--input/input.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/input/input.c b/input/input.c
index 89c1459f39..808eba3989 100644
--- a/input/input.c
+++ b/input/input.c
@@ -292,6 +292,8 @@ static unsigned int ar_delay = 100, ar_rate = 8, last_ar = 0;
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 @@ static config_t input_conf[] = {
{ "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 @@ mp_input_init(void) {
#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