summaryrefslogtreecommitdiffstats
path: root/player/main.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-13 01:14:07 +0200
committerwm4 <wm4@nowhere>2014-05-13 02:39:37 +0200
commit2279f718de746d5fed3b64df74e9c47af98975b5 (patch)
tree57aa74740fcd067a5e87cb9810b2888b0548aeee /player/main.c
parent2a2dd8aac2d68db1471bbb4fd852f85f3fcf9c24 (diff)
downloadmpv-2279f718de746d5fed3b64df74e9c47af98975b5.tar.bz2
mpv-2279f718de746d5fed3b64df74e9c47af98975b5.tar.xz
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.
Diffstat (limited to 'player/main.c')
-rw-r--r--player/main.c7
1 files changed, 2 insertions, 5 deletions
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);