diff options
author | wm4 <wm4@nowhere> | 2014-02-26 20:45:24 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-02-26 21:03:35 +0100 |
commit | 5bfe131340a72f5c87a37e903310e21968bef467 (patch) | |
tree | 532ca08d7b8aeed732786835769480f4339fe5a9 /player/playloop.c | |
parent | 9ccbc03ab17d3aa54cf91945ba1cdb77b60a2167 (diff) | |
download | mpv-5bfe131340a72f5c87a37e903310e21968bef467.tar.bz2 mpv-5bfe131340a72f5c87a37e903310e21968bef467.tar.xz |
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.
Diffstat (limited to 'player/playloop.c')
-rw-r--r-- | player/playloop.c | 5 |
1 files 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) |