summaryrefslogtreecommitdiff
path: root/apps/gui/wps.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/wps.c')
-rw-r--r--apps/gui/wps.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c
index 30c4aa85bb..b57f06d2b5 100644
--- a/apps/gui/wps.c
+++ b/apps/gui/wps.c
@@ -577,17 +577,20 @@ int wps_get_touchaction(struct wps_data *data)
577 short x,y; 577 short x,y;
578 short vx, vy; 578 short vx, vy;
579 int type = action_get_touchscreen_press(&x, &y); 579 int type = action_get_touchscreen_press(&x, &y);
580 int i;
581 static int last_action = ACTION_NONE; 580 static int last_action = ACTION_NONE;
582 struct touchregion *r; 581 struct touchregion *r;
583 bool repeated = (type == BUTTON_REPEAT); 582 bool repeated = (type == BUTTON_REPEAT);
584 bool released = (type == BUTTON_REL); 583 bool released = (type == BUTTON_REL);
585 for (i=0; i<data->touchregion_count; i++) 584 struct skin_token_list *regions = data->touchregions;
585 while (regions)
586 { 586 {
587 r = &data->touchregion[i]; 587 r = (struct touchregion *)regions->token->value.data;
588 /* make sure this region's viewport is visible */ 588 /* make sure this region's viewport is visible */
589 if (r->wvp->hidden_flags&VP_DRAW_HIDDEN) 589 if (r->wvp->hidden_flags&VP_DRAW_HIDDEN)
590 {
591 regions = regions->next;
590 continue; 592 continue;
593 }
591 /* reposition the touch inside the viewport */ 594 /* reposition the touch inside the viewport */
592 vx = x - r->wvp->vp.x; 595 vx = x - r->wvp->vp.x;
593 vy = y - r->wvp->vp.y; 596 vy = y - r->wvp->vp.y;
@@ -644,6 +647,7 @@ int wps_get_touchaction(struct wps_data *data)
644 } 647 }
645 } 648 }
646 } 649 }
650 regions = regions->next;
647 } 651 }
648 652
649 if ((last_action == ACTION_WPS_SEEKBACK || last_action == ACTION_WPS_SEEKFWD)) 653 if ((last_action == ACTION_WPS_SEEKBACK || last_action == ACTION_WPS_SEEKFWD))