diff options
author | wm4 <wm4@nowhere> | 2019-07-07 18:00:19 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-09-19 20:37:05 +0200 |
commit | c43846f2cb51054a5c74f95a1bc167542b8437f6 (patch) | |
tree | d4ed72a0741b4e494dcf9e01ead61aa3d518c222 /player/command.h | |
parent | b55b9cb98cf76443a24c7f7deae5853a4151e86d (diff) | |
download | mpv-c43846f2cb51054a5c74f95a1bc167542b8437f6.tar.bz2 mpv-c43846f2cb51054a5c74f95a1bc167542b8437f6.tar.xz |
screenshot: move message showing to common code
The screenshot command has this weird behavior that it shows messages
both on terminal and OSD by default, but that a command prefix can be
used to disable the OSD message.
Move this mechanism to common code, and make this available to other
commands too (although as of this commit only the screenshot commands
use it).
This gets rid of the weird screenshot_ctx.osd field too, which was sort
of set on a command, and sometimes inconsistently restored after the
command.
Diffstat (limited to 'player/command.h')
-rw-r--r-- | player/command.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/player/command.h b/player/command.h index ae3af82886..4cc774c6e8 100644 --- a/player/command.h +++ b/player/command.h @@ -70,6 +70,8 @@ void run_command(struct MPContext *mpctx, struct mp_cmd *cmd, void (*on_completion)(struct mp_cmd_ctx *cmd), void *on_completion_priv); void mp_cmd_ctx_complete(struct mp_cmd_ctx *cmd); +PRINTF_ATTRIBUTE(3, 4) +void mp_cmd_msg(struct mp_cmd_ctx *cmd, int status, const char *msg, ...); char *mp_property_expand_string(struct MPContext *mpctx, const char *str); char *mp_property_expand_escaped_string(struct MPContext *mpctx, const char *str); void property_print_help(struct MPContext *mpctx); |