summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-05-27 17:53:58 +0200
committerwm4 <wm4@nowhere>2015-05-27 17:53:58 +0200
commitba45c410d3b9ccda16bbaacfbd64d8a67a361c43 (patch)
treecc2978b24342efa7777dee1a0f7369ab46995a93
parentacc4102ba200ff396065de802a2950736eb9b679 (diff)
downloadmpv-ba45c410d3b9ccda16bbaacfbd64d8a67a361c43.tar.bz2
mpv-ba45c410d3b9ccda16bbaacfbd64d8a67a361c43.tar.xz
player: load scripts at an earlier point
This is about as early as possible.
-rw-r--r--player/main.c8
1 files 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