pictureflow: Fix slide_index bound

Parameters for fbound were in the wrong order
and slide_frame wasn't assigned the bounded value

Change-Id: I9b466e8b45e4318cadf59298f8c1145fa4d30ede
This commit is contained in:
Christian Soffke 2022-05-14 16:16:57 +02:00 committed by Aidan MacDonald
parent 5146c3043f
commit b357585852

View file

@ -3169,14 +3169,14 @@ static inline void set_current_slide(const int slide_index)
{
int old_center_index = center_index;
step = 0;
center_index = fbound(slide_index, 0, number_of_slides - 1);
center_index = fbound(0, slide_index, number_of_slides - 1);
if (old_center_index != center_index)
{
rb->queue_remove_from_head(&thread_q, EV_WAKEUP);
rb->queue_post(&thread_q, EV_WAKEUP, 0);
}
target = center_index;
slide_frame = slide_index << 16;
slide_frame = center_index << 16;
reset_slides();
}