summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-11 01:54:03 +0200
committerwm4 <wm4@nowhere>2014-06-11 01:54:03 +0200
commitbe5725ebc4813f9d5c582fd0f30fe1ebc661e3e1 (patch)
tree18102331bfc7e9adc824b082721e6319bc5decca /options
parent654930aa47e10c07aa0399f515a8dd04d34efa3a (diff)
downloadmpv-be5725ebc4813f9d5c582fd0f30fe1ebc661e3e1.tar.bz2
mpv-be5725ebc4813f9d5c582fd0f30fe1ebc661e3e1.tar.xz
input: make option struct local
Similar to previous commits. This also renames --doubleclick-time to --input-doubleclick-time, and --key-fifo-size to --input-key-fifo-size. We could keep the old names, but these options are very obscure, and renaming them seems better for consistency.
Diffstat (limited to 'options')
-rw-r--r--options/options.c18
-rw-r--r--options/options.h19
2 files changed, 3 insertions, 34 deletions
diff --git a/options/options.c b/options/options.c
index c494a23dd3..a34f0e7bf5 100644
--- a/options/options.c
+++ b/options/options.c
@@ -65,6 +65,7 @@ extern const struct m_sub_options demux_rawvideo_conf;
extern const struct m_sub_options demux_lavf_conf;
extern const struct m_sub_options vd_lavc_conf;
extern const struct m_sub_options ad_lavc_conf;
+extern const struct m_sub_options input_config;
extern const struct m_obj_list vf_obj_list;
extern const struct m_obj_list af_obj_list;
@@ -81,7 +82,6 @@ static const m_option_t screenshot_conf[] = {
{0},
};
-extern const m_option_t mp_input_opts[];
const m_option_t mp_opts[] = {
// handled in command line pre-parser (parse_commandline.c)
@@ -492,13 +492,12 @@ const m_option_t mp_opts[] = {
OPT_FLAG("slave-broken", slave_mode, CONF_GLOBAL),
OPT_FLAG("idle", player_idle_mode, M_OPT_GLOBAL),
- OPT_INTRANGE("key-fifo-size", input.key_fifo_size, CONF_GLOBAL, 2, 65000),
OPT_FLAG("input-terminal", consolecontrols, CONF_GLOBAL),
OPT_FLAG("input-cursor", vo.enable_mouse_movements, CONF_GLOBAL),
{"screenshot", (void *) screenshot_conf, CONF_TYPE_SUBCONFIG},
- {"", (void *) mp_input_opts, CONF_TYPE_SUBCONFIG},
+ OPT_SUBSTRUCT("input", input_opts, input_config, 0),
OPT_PRINT("list-properties", property_print_help),
OPT_PRINT("help", print_help),
@@ -645,19 +644,6 @@ const struct MPOpts mp_default_opts = {
.mf_fps = 1.0,
- .input = {
- .key_fifo_size = 7,
- .doubleclick_time = 300,
- .ar_delay = 200,
- .ar_rate = 40,
- .use_lirc = 1,
- .use_alt_gr = 1,
-#if HAVE_COCOA
- .use_appleremote = 1,
- .use_media_keys = 1,
-#endif
- .default_bindings = 1,
- },
.encode_output = {
.metadata = 1,
},
diff --git a/options/options.h b/options/options.h
index b87c64ed17..ec66b33c8b 100644
--- a/options/options.h
+++ b/options/options.h
@@ -263,24 +263,7 @@ typedef struct MPOpts {
struct vd_lavc_params *vd_lavc_params;
struct ad_lavc_params *ad_lavc_params;
- struct input_conf {
- char *config_file;
- int doubleclick_time;
- int key_fifo_size;
- int ar_delay;
- int ar_rate;
- char *js_dev;
- char *in_file;
- int use_joystick;
- int use_lirc;
- char *lirc_configfile;
- int use_lircc;
- int use_alt_gr;
- int use_appleremote;
- int use_media_keys;
- int default_bindings;
- int test;
- } input;
+ struct input_opts *input_opts;
struct encode_output_conf {
char *file;