diff options
author | wm4 <wm4@nowhere> | 2015-08-06 00:14:23 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-08-06 00:17:30 +0200 |
commit | 9bcc882659d5834bb3728c1398508dc14ad12736 (patch) | |
tree | d6ad910cd2d6129ca0def941ccf00feacf66663a /player/lua.c | |
parent | d1179f95011103a1e3aa9bacd270e82935370f88 (diff) | |
download | mpv-9bcc882659d5834bb3728c1398508dc14ad12736.tar.bz2 mpv-9bcc882659d5834bb3728c1398508dc14ad12736.tar.xz |
lua: make mp.input_define_section use the define-section command
Diffstat (limited to 'player/lua.c')
-rw-r--r-- | player/lua.c | 21 |
1 files changed, 0 insertions, 21 deletions
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, "<script>", contents, builtin); - return 0; -} - static int script_input_enable_section(lua_State *L) { struct MPContext *mpctx = get_mpctx(L); @@ -1321,7 +1301,6 @@ static const struct fn_entry main_fns[] = { FN_ENTRY(get_screen_margins), FN_ENTRY(get_mouse_pos), FN_ENTRY(get_time), - FN_ENTRY(input_define_section), FN_ENTRY(input_enable_section), FN_ENTRY(input_disable_section), FN_ENTRY(input_set_section_mouse_area), |