From 2279f718de746d5fed3b64df74e9c47af98975b5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 13 May 2014 01:14:07 +0200 Subject: player: reorganize how lua scripts are loaded Make loading of scripts independent of Lua. Move some of the loading code from lua.c to scripting.c, and make it easier to add new scripting backends. --- player/main.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'player/main.c') diff --git a/player/main.c b/player/main.c index 097e51e11c..8c5e90a0d7 100644 --- a/player/main.c +++ b/player/main.c @@ -61,7 +61,6 @@ #include "core.h" #include "client.h" -#include "lua.h" #include "command.h" #include "screenshot.h" @@ -450,11 +449,9 @@ int mp_initialize(struct MPContext *mpctx) mpctx->initialized_flags |= INITIALIZED_VO; } -#if HAVE_LUA - // Lua user scripts can call arbitrary functions. Load them at a point + // Lua user scripts (etc.) can call arbitrary functions. Load them at a point // where this is safe. - mp_lua_init(mpctx); -#endif + mp_load_scripts(mpctx); if (opts->shuffle) playlist_shuffle(mpctx->playlist); -- cgit v1.2.3