summaryrefslogtreecommitdiff
path: root/apps
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 /apps
parent5146c3043fa559eab454a7c71f7045e2e016f2e7 (diff)
downloadrockbox-b357585852d5a43e0399f13f80ec5474d7e67e63.tar.gz
rockbox-b357585852d5a43e0399f13f80ec5474d7e67e63.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
Diffstat (limited to 'apps')
-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)
3169{ 3169{
3170 int old_center_index = center_index; 3170 int old_center_index = center_index;
3171 step = 0; 3171 step = 0;
3172 center_index = fbound(slide_index, 0, number_of_slides - 1); 3172 center_index = fbound(0, slide_index, number_of_slides - 1);
3173 if (old_center_index != center_index) 3173 if (old_center_index != center_index)
3174 { 3174 {
3175 rb->queue_remove_from_head(&thread_q, EV_WAKEUP); 3175 rb->queue_remove_from_head(&thread_q, EV_WAKEUP);
3176 rb->queue_post(&thread_q, EV_WAKEUP, 0); 3176 rb->queue_post(&thread_q, EV_WAKEUP, 0);
3177 } 3177 }
3178 target = center_index; 3178 target = center_index;
3179 slide_frame = slide_index << 16; 3179 slide_frame = center_index << 16;
3180 reset_slides(); 3180 reset_slides();
3181} 3181}
3182 3182