1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 21:06:00 +00:00

player: load scripts at an earlier point

This is about as early as possible.
This commit is contained in:
wm4 2015-05-27 17:53:58 +02:00
parent acc4102ba2
commit ba45c410d3

View File

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