Pause slideshow when view->playing is false

Signed-off-by: Robert Günzler <r@gnzler.io>
This commit is contained in:
Robert Guenzler 2022-03-18 21:43:13 +01:00 committed by Harry Jeffery
parent 6776568b6c
commit 50343ba7ce

View file

@ -1130,7 +1130,7 @@ int imv_run(struct imv *imv)
}
/* handle slideshow */
if (imv->slideshow.duration != 0.0) {
if (imv_viewport_is_playing(imv->view) && imv->slideshow.duration != 0.0) {
double dt = current_time - last_time;
imv->slideshow.elapsed += dt;