summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorKevin Mitchell <kevmitch@gmail.com>2018-01-21 15:36:08 -0800
committerKevin Mitchell <kevmitch@gmail.com>2018-01-26 21:50:38 -0800
commit3766024dcd85ec7b3bffdcf81cf1356d6fc82543 (patch)
tree464a329515afcc23579822e598804443677b39aa /player
parent8c8dcc698b394be4de5804313e8d8a7a4c094e2f (diff)
downloadmpv-3766024dcd85ec7b3bffdcf81cf1356d6fc82543.tar.bz2
mpv-3766024dcd85ec7b3bffdcf81cf1356d6fc82543.tar.xz
command: add --osd-on-seek option defaulting to bar
Restores behaviour prior to aef2ed5dc13e37dec0670c451b4369b151d5c65f. That change was apparently unpopular. However, given the amount of complaining over how hard it is to change the defaults by rebinding every key, I think the extra option introduced by this commit is justified. Technically not all behaviour is restored, because now --no-osd-bar will not instead display the msg text on seek. I think that feature was a little weird and is now easy enough to remedy with the --osd-on-seek option.
Diffstat (limited to 'player')
-rw-r--r--player/command.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/player/command.c b/player/command.c
index 2da7834233..4c03c7579e 100644
--- a/player/command.c
+++ b/player/command.c
@@ -4804,6 +4804,9 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
bool auto_osd = on_osd == MP_ON_OSD_AUTO;
bool msg_osd = auto_osd || (on_osd & MP_ON_OSD_MSG);
bool bar_osd = auto_osd || (on_osd & MP_ON_OSD_BAR);
+ bool seek_msg_osd = auto_osd ? opts->osd_on_seek & 2 : msg_osd;
+ bool seek_bar_osd = auto_osd ? opts->osd_on_seek & 1 : bar_osd;
+
int osdl = msg_osd ? 1 : OSD_LEVEL_INVISIBLE;
bool async = cmd->flags & MP_ASYNC_CMD;
@@ -4867,9 +4870,9 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
set_osd_function(mpctx, v > 0 ? OSD_FFW : OSD_REW);
break;
}}
- if (bar_osd)
+ if (seek_bar_osd)
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_BAR;
- if (msg_osd)
+ if (seek_msg_osd)
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_TEXT;
break;
}
@@ -4888,9 +4891,9 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
queue_seek(mpctx, MPSEEK_ABSOLUTE, oldpts, MPSEEK_EXACT,
MPSEEK_FLAG_DELAY);
set_osd_function(mpctx, OSD_REW);
- if (bar_osd)
+ if (seek_bar_osd)
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_BAR;
- if (msg_osd)
+ if (seek_msg_osd)
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_TEXT;
} else {
return -1;
@@ -5119,9 +5122,9 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
queue_seek(mpctx, MPSEEK_ABSOLUTE, a[0], MPSEEK_EXACT,
MPSEEK_FLAG_DELAY);
set_osd_function(mpctx, (a[0] > refpts) ? OSD_FFW : OSD_REW);
- if (bar_osd)
+ if (seek_bar_osd)
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_BAR;
- if (msg_osd)
+ if (seek_msg_osd)
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_TEXT;
}
}