1
mirror of https://github.com/mpv-player/mpv synced 2024-08-04 14:59:58 +02:00

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
This commit is contained in:
albeu 2002-04-20 08:51:09 +00:00
parent 0b352877d7
commit dbbd2241ad

View File

@ -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