From 5bfe131340a72f5c87a37e903310e21968bef467 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 26 Feb 2014 20:45:24 +0100 Subject: client API: don't send MPV_EVENT_IDLE when not entering idle mode For simplicity, this was sent before actually checking the idle condition, which meant that we'd send it even of the idle loop is never entered. --- player/playloop.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/player/playloop.c b/player/playloop.c index 6b072b7414..d1d15ca192 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -1323,13 +1323,14 @@ void run_playloop(struct MPContext *mpctx) void idle_loop(struct MPContext *mpctx) { // ================= idle loop (STOP state) ========================= - mp_notify(mpctx, MPV_EVENT_IDLE, NULL); bool need_reinit = true; while (mpctx->opts->player_idle_mode && !mpctx->playlist->current && mpctx->stop_play != PT_QUIT) { - if (need_reinit) + if (need_reinit) { + mp_notify(mpctx, MPV_EVENT_IDLE, NULL); handle_force_window(mpctx, true); + } need_reinit = false; int uninit = INITIALIZED_AO; if (!mpctx->opts->force_vo) -- cgit v1.2.3