summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossymiles@gmail.com>2015-11-22 21:40:20 +1100
committerJames Ross-Gowan <rossymiles@gmail.com>2015-11-23 19:50:13 +1100
commit718807b78b689f8f478b08ebaa101afce9ffd3dd (patch)
tree22574e6bd43391e7de350e2394e110f88bde0f50
parentd2efa56d48464107ed14c9822586eee5276a4b32 (diff)
downloadmpv-718807b78b689f8f478b08ebaa101afce9ffd3dd.tar.bz2
mpv-718807b78b689f8f478b08ebaa101afce9ffd3dd.tar.xz
win32: don't show progress indicator in idle mode
-rw-r--r--player/misc.c4
-rw-r--r--video/out/vo.h1
-rw-r--r--video/out/w32_common.c17
3 files changed, 16 insertions, 6 deletions
diff --git a/player/misc.c b/player/misc.c
index db3dd0402f..0b2548b98b 100644
--- a/player/misc.c
+++ b/player/misc.c
@@ -141,11 +141,13 @@ void update_vo_playback_state(struct MPContext *mpctx)
if (mpctx->video_out) {
struct voctrl_playback_state oldstate = mpctx->vo_playback_state;
struct voctrl_playback_state newstate = {
+ .playing = mpctx->playing,
.paused = mpctx->paused,
.percent_pos = get_percent_pos(mpctx),
};
- if (oldstate.paused != newstate.paused ||
+ if (oldstate.playing != newstate.playing ||
+ oldstate.paused != newstate.paused ||
oldstate.percent_pos != newstate.percent_pos) {
vo_control(mpctx->video_out,
VOCTRL_UPDATE_PLAYBACK_STATE, &newstate);
diff --git a/video/out/vo.h b/video/out/vo.h
index 3a8231a295..a9000ebb86 100644
--- a/video/out/vo.h
+++ b/video/out/vo.h
@@ -133,6 +133,7 @@ struct voctrl_get_equalizer_args {
// VOCTRL_UPDATE_PLAYBACK_STATE
struct voctrl_playback_state {
+ bool playing;
bool paused;
int percent_pos;
};
diff --git a/video/out/w32_common.c b/video/out/w32_common.c
index 6f0bb82ed3..6d02c62c57 100644
--- a/video/out/w32_common.c
+++ b/video/out/w32_common.c
@@ -1376,13 +1376,20 @@ static int gui_thread_control(struct vo_w32_state *w32, int request, void *arg)
struct voctrl_playback_state *pstate =
(struct voctrl_playback_state *)arg;
- if (w32->taskbar_list3 && w32->tbtnCreated) {
- ITaskbarList3_SetProgressValue(w32->taskbar_list3, w32->window,
- pstate->percent_pos, 100);
+ if (!w32->taskbar_list3 || !w32->tbtnCreated)
+ return VO_TRUE;
+
+ if (!pstate->playing) {
ITaskbarList3_SetProgressState(w32->taskbar_list3, w32->window,
- pstate->paused ? TBPF_PAUSED :
- TBPF_NORMAL);
+ TBPF_NOPROGRESS);
+ return VO_TRUE;
}
+
+ ITaskbarList3_SetProgressValue(w32->taskbar_list3, w32->window,
+ pstate->percent_pos, 100);
+ ITaskbarList3_SetProgressState(w32->taskbar_list3, w32->window,
+ pstate->paused ? TBPF_PAUSED :
+ TBPF_NORMAL);
return VO_TRUE;
}
case VOCTRL_GET_DISPLAY_FPS: