From b3b2cc44fa783c1575b3e229c79f2977f75a57c1 Mon Sep 17 00:00:00 2001 From: James Ross-Gowan Date: Sun, 8 Dec 2019 03:16:10 +1100 Subject: console.lua: add this script Merged from mpv-repl git repo commit 5ea2bf64f9c239f0326b02. Some changes were made on top of it: - Tabs were converted to 4 spaces indentation (plus some manual indentation fixes in some places). - All user-visible mentions of "repl" were renamed to "console". - The README was converted to a manpage (with heavy changes, some additions taken from stats.rst; rossy converted the key bindings table to RST). - The method to change the default key binding was changed. - Change minor detail about "font" default value setting (not a functional change). - Integrate into the player as builtin script, including an option to prevent loading it. Above changes and commit message done by wm4. Signed-off-by: wm4 --- options/options.c | 2 ++ options/options.h | 1 + 2 files changed, 3 insertions(+) (limited to 'options') diff --git a/options/options.c b/options/options.c index 26aaa24c91..b7f2357ebe 100644 --- a/options/options.c +++ b/options/options.c @@ -400,6 +400,7 @@ static const m_option_t mp_opts[] = { OPT_STRING("ytdl-format", lua_ytdl_format, 0), OPT_KEYVALUELIST("ytdl-raw-options", lua_ytdl_raw_options, 0), OPT_FLAG("load-stats-overlay", lua_load_stats, UPDATE_BUILTIN_SCRIPTS), + OPT_FLAG("load-osd-console", lua_load_console, UPDATE_BUILTIN_SCRIPTS), #endif // ------------------------- stream options -------------------- @@ -920,6 +921,7 @@ static const struct MPOpts mp_default_opts = { .lua_ytdl_format = NULL, .lua_ytdl_raw_options = NULL, .lua_load_stats = 1, + .lua_load_console = 1, #endif .auto_load_scripts = 1, .loop_times = 1, diff --git a/options/options.h b/options/options.h index ca87fd4ac9..588b897e57 100644 --- a/options/options.h +++ b/options/options.h @@ -139,6 +139,7 @@ typedef struct MPOpts { char *lua_ytdl_format; char **lua_ytdl_raw_options; int lua_load_stats; + int lua_load_console; int auto_load_scripts; -- cgit v1.2.3