From ba45c410d3b9ccda16bbaacfbd64d8a67a361c43 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 27 May 2015 17:53:58 +0200 Subject: [PATCH] player: load scripts at an earlier point This is about as early as possible. --- player/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/player/main.c b/player/main.c index bc08310e9c..be14dfe03b 100644 --- a/player/main.c +++ b/player/main.c @@ -454,6 +454,10 @@ int mp_initialize(struct MPContext *mpctx, char **options) mp_get_resume_defaults(mpctx); + // Lua user scripts (etc.) can call arbitrary functions. Load them at a point + // where this is safe. + mp_load_scripts(mpctx); + if (opts->consolecontrols && cas_terminal_owner(mpctx, mpctx)) terminal_setup_getch(mpctx->input); @@ -478,10 +482,6 @@ int mp_initialize(struct MPContext *mpctx, char **options) mpctx->mouse_cursor_visible = true; } - // Lua user scripts (etc.) can call arbitrary functions. Load them at a point - // where this is safe. - mp_load_scripts(mpctx); - #if !defined(__MINGW32__) mpctx->ipc_ctx = mp_init_ipc(mpctx->clients, mpctx->global); #endif