summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2022-05-14 16:16:57 +0200
committerAidan MacDonald <amachronic@protonmail.com>2022-05-22 06:55:58 -0400
commitb357585852d5a43e0399f13f80ec5474d7e67e63 (patch)
tree048e70b65062cfcdc493b37a4f4d01305e7ffc4d
parent5146c3043fa559eab454a7c71f7045e2e016f2e7 (diff)
downloadrockbox-b357585852.tar.gz
rockbox-b357585852.zip
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
-rw-r--r--apps/plugins/pictureflow/pictureflow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c
index 65efed72c7..38f24732de 100644
--- a/apps/plugins/pictureflow/pictureflow.c
+++ b/apps/plugins/pictureflow/pictureflow.c
@@ -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();
}