forked from len0rd/rockbox
1) Make touchscreen interface more intuitive
2) Comment the code git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17676 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
bc97952134
commit
cad30d334c
2 changed files with 49 additions and 22 deletions
|
|
@ -281,11 +281,12 @@ int get_action_statuscode(int *button)
|
|||
}
|
||||
|
||||
#ifdef HAVE_TOUCHPAD
|
||||
/* return BUTTON_NONE on error
|
||||
BUTTON_REPEAT if repeated press
|
||||
BUTTON_REL if its a short press
|
||||
BUTTON_TOUCHPAD otherwise
|
||||
*/
|
||||
/* return BUTTON_NONE on error
|
||||
* BUTTON_REPEAT if repeated press
|
||||
* BUTTON_REPEAT|BUTTON_REL if release after repeated press
|
||||
* BUTTON_REL if its a short press = release after press
|
||||
* BUTTON_TOUCHPAD if press
|
||||
*/
|
||||
int action_get_touchpad_press(short *x, short *y)
|
||||
{
|
||||
static int last_data = 0;
|
||||
|
|
@ -308,7 +309,7 @@ int action_get_touchpad_press(short *x, short *y)
|
|||
return BUTTON_REPEAT;
|
||||
if (short_press)
|
||||
return BUTTON_REL;
|
||||
/* this is to give a BUTTON_REL after a BUTTON_REPEAT */
|
||||
/* This is to return a BUTTON_REL after a BUTTON_REPEAT. */
|
||||
if (last_button & BUTTON_REL)
|
||||
return BUTTON_REPEAT|BUTTON_REL;
|
||||
return BUTTON_TOUCHPAD;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue