From b4d149433651bf45de89a44d621e6985235b090f Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 27 Sep 2014 15:47:49 +0200 Subject: input: separate creation and loading of config Until now, creating the input_ctx was delayed until the command line and config files were parsed. Separate creation and loading so that input_ctx is available from start. This should make it possible to simplify some things. For example, some complications with Cocoa were apparently only because input_ctx was available only "later". (Although I'm not sure if this is still relevant, or if the Cocoa code should even be organized this way.) --- player/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'player/main.c') diff --git a/player/main.c b/player/main.c index 93f974c107..ff3b8ab7fe 100644 --- a/player/main.c +++ b/player/main.c @@ -333,6 +333,7 @@ struct MPContext *mp_create(void) mpctx->global->opts = mpctx->opts; + mpctx->input = mp_input_init(mpctx->global); screenshot_init(mpctx); mpctx->mixer = mixer_init(mpctx, mpctx->global); command_init(mpctx); @@ -377,7 +378,7 @@ int mp_initialize(struct MPContext *mpctx) m_config_set_option0(mpctx->mconfig, "input-file", "/dev/stdin"); } - mpctx->input = mp_input_init(mpctx->global); + mp_input_load(mpctx->input); mp_input_set_cancel(mpctx->input, mpctx->playback_abort); mp_dispatch_set_wakeup_fn(mpctx->dispatch, wakeup_playloop, mpctx); -- cgit v1.2.3