mirror of
https://github.com/mpv-player/mpv
synced 2025-03-22 19:34:14 +00:00
win32: don't show progress indicator in idle mode
This commit is contained in:
parent
d2efa56d48
commit
718807b78b
@ -141,11 +141,13 @@ void update_vo_playback_state(struct MPContext *mpctx)
|
|||||||
if (mpctx->video_out) {
|
if (mpctx->video_out) {
|
||||||
struct voctrl_playback_state oldstate = mpctx->vo_playback_state;
|
struct voctrl_playback_state oldstate = mpctx->vo_playback_state;
|
||||||
struct voctrl_playback_state newstate = {
|
struct voctrl_playback_state newstate = {
|
||||||
|
.playing = mpctx->playing,
|
||||||
.paused = mpctx->paused,
|
.paused = mpctx->paused,
|
||||||
.percent_pos = get_percent_pos(mpctx),
|
.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) {
|
oldstate.percent_pos != newstate.percent_pos) {
|
||||||
vo_control(mpctx->video_out,
|
vo_control(mpctx->video_out,
|
||||||
VOCTRL_UPDATE_PLAYBACK_STATE, &newstate);
|
VOCTRL_UPDATE_PLAYBACK_STATE, &newstate);
|
||||||
|
@ -133,6 +133,7 @@ struct voctrl_get_equalizer_args {
|
|||||||
|
|
||||||
// VOCTRL_UPDATE_PLAYBACK_STATE
|
// VOCTRL_UPDATE_PLAYBACK_STATE
|
||||||
struct voctrl_playback_state {
|
struct voctrl_playback_state {
|
||||||
|
bool playing;
|
||||||
bool paused;
|
bool paused;
|
||||||
int percent_pos;
|
int percent_pos;
|
||||||
};
|
};
|
||||||
|
@ -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 *pstate =
|
||||||
(struct voctrl_playback_state *)arg;
|
(struct voctrl_playback_state *)arg;
|
||||||
|
|
||||||
if (w32->taskbar_list3 && w32->tbtnCreated) {
|
if (!w32->taskbar_list3 || !w32->tbtnCreated)
|
||||||
ITaskbarList3_SetProgressValue(w32->taskbar_list3, w32->window,
|
return VO_TRUE;
|
||||||
pstate->percent_pos, 100);
|
|
||||||
|
if (!pstate->playing) {
|
||||||
ITaskbarList3_SetProgressState(w32->taskbar_list3, w32->window,
|
ITaskbarList3_SetProgressState(w32->taskbar_list3, w32->window,
|
||||||
pstate->paused ? TBPF_PAUSED :
|
TBPF_NOPROGRESS);
|
||||||
TBPF_NORMAL);
|
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;
|
return VO_TRUE;
|
||||||
}
|
}
|
||||||
case VOCTRL_GET_DISPLAY_FPS:
|
case VOCTRL_GET_DISPLAY_FPS:
|
||||||
|
Loading…
Reference in New Issue
Block a user