summaryrefslogtreecommitdiff
path: root/apps/plugins/pong.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/pong.c')
-rw-r--r--apps/plugins/pong.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/apps/plugins/pong.c b/apps/plugins/pong.c
index a6144d9664..1c6f02eb0d 100644
--- a/apps/plugins/pong.c
+++ b/apps/plugins/pong.c
@@ -450,21 +450,21 @@ int keys(struct pong *p)
450 int start = *rb->current_tick; 450 int start = *rb->current_tick;
451 int end = start + time; 451 int end = start + time;
452 452
453 while(end > *rb->current_tick) { 453 while(TIME_BEFORE(*rb->current_tick, end)) {
454 key = rb->button_get_w_tmo(end - *rb->current_tick); 454 key = rb->button_get_w_tmo(end - *rb->current_tick);
455 455
456#ifdef HAVE_TOUCHSCREEN 456#ifdef HAVE_TOUCHSCREEN
457 short touch_x, touch_y; 457 short touch_x, touch_y;
458 if(key & BUTTON_TOUCHSCREEN) 458 if(key & BUTTON_TOUCHSCREEN)
459 { 459 {
460 touch_x = rb->button_get_data() >> 16; 460 touch_x = rb->button_get_data() >> 16;
461 touch_y = rb->button_get_data() & 0xFFFF; 461 touch_y = rb->button_get_data() & 0xFFFF;
462 if(touch_x >= xpos[0] && touch_x <= xpos[0]+(PAD_WIDTH*4)) 462 if(touch_x >= xpos[0] && touch_x <= xpos[0]+(PAD_WIDTH*4))
463 padmove(&p->w_pad[0], touch_y-(p->e_pad[0]*2+PAD_HEIGHT)/2); 463 padmove(&p->w_pad[0], touch_y-(p->e_pad[0]*2+PAD_HEIGHT)/2);
464 464
465 if(touch_x >= xpos[1]-(PAD_WIDTH*4) && touch_x <= xpos[1]) 465 if(touch_x >= xpos[1]-(PAD_WIDTH*4) && touch_x <= xpos[1])
466 padmove(&p->w_pad[1], touch_y-(p->e_pad[1]*2+PAD_HEIGHT)/2); 466 padmove(&p->w_pad[1], touch_y-(p->e_pad[1]*2+PAD_HEIGHT)/2);
467 } 467 }
468#endif 468#endif
469 469
470#ifdef HAS_BUTTON_HOLD 470#ifdef HAS_BUTTON_HOLD