Even more touchscreen improvements.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17673 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
995b71a51d
commit
5dca53eeb0
2 changed files with 6 additions and 10 deletions
|
@ -310,7 +310,7 @@ int action_get_touchpad_press(short *x, short *y)
|
|||
return BUTTON_REL;
|
||||
/* this is to give a BUTTON_REL after a BUTTON_REPEAT */
|
||||
if (last_button & BUTTON_REL)
|
||||
return BUTTON_REL;
|
||||
return BUTTON_REPEAT|BUTTON_REL;
|
||||
return BUTTON_TOUCHPAD;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -278,7 +278,7 @@ void list_draw(struct screen *display, struct viewport *parent,
|
|||
|
||||
|
||||
#if defined(HAVE_TOUCHPAD)
|
||||
static int prev_line=0;
|
||||
static unsigned int prev_line=0;
|
||||
/* this needs to be fixed if we ever get more than 1 touchscreen on a target */
|
||||
/* this also assumes the whole screen is used, which is a bad asusmption but
|
||||
fine untill customizable lists comes in... */
|
||||
|
@ -297,7 +297,7 @@ unsigned gui_synclist_do_touchpad(struct gui_synclist * gui_list, struct viewpor
|
|||
{
|
||||
if (button == BUTTON_REL)
|
||||
return ACTION_STD_MENU;
|
||||
else if (button == BUTTON_REPEAT)
|
||||
else if (button == (BUTTON_REPEAT|BUTTON_REL))
|
||||
return ACTION_STD_CONTEXT;
|
||||
else
|
||||
return ACTION_NONE;
|
||||
|
@ -355,13 +355,13 @@ unsigned gui_synclist_do_touchpad(struct gui_synclist * gui_list, struct viewpor
|
|||
return ACTION_REDRAW;
|
||||
}
|
||||
|
||||
if (button == BUTTON_REPEAT)
|
||||
if (button == (BUTTON_REPEAT|BUTTON_REL))
|
||||
return ACTION_STD_CONTEXT;
|
||||
else if(button == BUTTON_REL)
|
||||
{
|
||||
if(prev_line == line)
|
||||
if((signed)prev_line == line)
|
||||
{
|
||||
prev_line = 0;
|
||||
prev_line = -1;
|
||||
return ACTION_STD_OK;
|
||||
}
|
||||
else
|
||||
|
@ -375,14 +375,10 @@ unsigned gui_synclist_do_touchpad(struct gui_synclist * gui_list, struct viewpor
|
|||
}
|
||||
/* title goes up one level */
|
||||
else if (y > title_text[SCREEN_MAIN].y && draw_title(display, parent, gui_list) && button == BUTTON_REL)
|
||||
{
|
||||
return ACTION_STD_CANCEL;
|
||||
}
|
||||
/* title or statusbar is cancel */
|
||||
else if (global_settings.statusbar && button == BUTTON_REL)
|
||||
{
|
||||
return ACTION_STD_CANCEL;
|
||||
}
|
||||
}
|
||||
return ACTION_NONE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue