summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2008-06-01 13:56:34 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2008-06-01 13:56:34 +0000
commit5dca53eeb0e5ee17bfb5ff436655fa991d0786bd (patch)
treeb2c73e16ae49c854c05651a1120f569db5102906
parent995b71a51d3cfa37ebf5dd40d83bd6c0aed019d4 (diff)
downloadrockbox-5dca53eeb0e5ee17bfb5ff436655fa991d0786bd.tar.gz
rockbox-5dca53eeb0e5ee17bfb5ff436655fa991d0786bd.zip
Even more touchscreen improvements.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17673 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/action.c2
-rw-r--r--apps/gui/bitmap/list.c14
2 files changed, 6 insertions, 10 deletions
diff --git a/apps/action.c b/apps/action.c
index 5d0f994862..0614443bac 100644
--- a/apps/action.c
+++ b/apps/action.c
@@ -310,7 +310,7 @@ int action_get_touchpad_press(short *x, short *y)
310 return BUTTON_REL; 310 return BUTTON_REL;
311 /* this is to give a BUTTON_REL after a BUTTON_REPEAT */ 311 /* this is to give a BUTTON_REL after a BUTTON_REPEAT */
312 if (last_button & BUTTON_REL) 312 if (last_button & BUTTON_REL)
313 return BUTTON_REL; 313 return BUTTON_REPEAT|BUTTON_REL;
314 return BUTTON_TOUCHPAD; 314 return BUTTON_TOUCHPAD;
315} 315}
316#endif 316#endif
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c
index f1dbf188ab..dacf65adbd 100644
--- a/apps/gui/bitmap/list.c
+++ b/apps/gui/bitmap/list.c
@@ -278,7 +278,7 @@ void list_draw(struct screen *display, struct viewport *parent,
278 278
279 279
280#if defined(HAVE_TOUCHPAD) 280#if defined(HAVE_TOUCHPAD)
281static int prev_line=0; 281static unsigned int prev_line=0;
282/* this needs to be fixed if we ever get more than 1 touchscreen on a target */ 282/* this needs to be fixed if we ever get more than 1 touchscreen on a target */
283/* this also assumes the whole screen is used, which is a bad asusmption but 283/* this also assumes the whole screen is used, which is a bad asusmption but
284 fine untill customizable lists comes in... */ 284 fine untill customizable lists comes in... */
@@ -297,7 +297,7 @@ unsigned gui_synclist_do_touchpad(struct gui_synclist * gui_list, struct viewpor
297 { 297 {
298 if (button == BUTTON_REL) 298 if (button == BUTTON_REL)
299 return ACTION_STD_MENU; 299 return ACTION_STD_MENU;
300 else if (button == BUTTON_REPEAT) 300 else if (button == (BUTTON_REPEAT|BUTTON_REL))
301 return ACTION_STD_CONTEXT; 301 return ACTION_STD_CONTEXT;
302 else 302 else
303 return ACTION_NONE; 303 return ACTION_NONE;
@@ -355,13 +355,13 @@ unsigned gui_synclist_do_touchpad(struct gui_synclist * gui_list, struct viewpor
355 return ACTION_REDRAW; 355 return ACTION_REDRAW;
356 } 356 }
357 357
358 if (button == BUTTON_REPEAT) 358 if (button == (BUTTON_REPEAT|BUTTON_REL))
359 return ACTION_STD_CONTEXT; 359 return ACTION_STD_CONTEXT;
360 else if(button == BUTTON_REL) 360 else if(button == BUTTON_REL)
361 { 361 {
362 if(prev_line == line) 362 if((signed)prev_line == line)
363 { 363 {
364 prev_line = 0; 364 prev_line = -1;
365 return ACTION_STD_OK; 365 return ACTION_STD_OK;
366 } 366 }
367 else 367 else
@@ -375,14 +375,10 @@ unsigned gui_synclist_do_touchpad(struct gui_synclist * gui_list, struct viewpor
375 } 375 }
376 /* title goes up one level */ 376 /* title goes up one level */
377 else if (y > title_text[SCREEN_MAIN].y && draw_title(display, parent, gui_list) && button == BUTTON_REL) 377 else if (y > title_text[SCREEN_MAIN].y && draw_title(display, parent, gui_list) && button == BUTTON_REL)
378 {
379 return ACTION_STD_CANCEL; 378 return ACTION_STD_CANCEL;
380 }
381 /* title or statusbar is cancel */ 379 /* title or statusbar is cancel */
382 else if (global_settings.statusbar && button == BUTTON_REL) 380 else if (global_settings.statusbar && button == BUTTON_REL)
383 {
384 return ACTION_STD_CANCEL; 381 return ACTION_STD_CANCEL;
385 }
386 } 382 }
387 return ACTION_NONE; 383 return ACTION_NONE;
388} 384}