From 9bcc882659d5834bb3728c1398508dc14ad12736 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 6 Aug 2015 00:14:23 +0200 Subject: lua: make mp.input_define_section use the define-section command --- player/lua.c | 21 --------------------- player/lua/defaults.lua | 7 +++++++ 2 files changed, 7 insertions(+), 21 deletions(-) (limited to 'player') diff --git a/player/lua.c b/player/lua.c index 5a16c9202a..3621e7aee5 100644 --- a/player/lua.c +++ b/player/lua.c @@ -1024,26 +1024,6 @@ static int script_get_time(lua_State *L) return 1; } -static int script_input_define_section(lua_State *L) -{ - struct MPContext *mpctx = get_mpctx(L); - char *section = (char *)luaL_checkstring(L, 1); - char *contents = (char *)luaL_checkstring(L, 2); - char *flags = (char *)luaL_optstring(L, 3, ""); - bool builtin = true; - if (strcmp(flags, "default") == 0) { - builtin = true; - } else if (strcmp(flags, "force") == 0) { - builtin = false; - } else if (strcmp(flags, "") == 0) { - //pass - } else { - luaL_error(L, "invalid flags: '%s'", flags); - } - mp_input_define_section(mpctx->input, section, "