Hopefully get all of the touchscreen drivers to act the same so release events get the appropriate data.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22314 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Karl Kurbjun 2009-08-14 23:08:50 +00:00
parent 65eaf60b35
commit 7ca4c7358d
3 changed files with 15 additions and 5 deletions

View file

@ -158,6 +158,9 @@ bool button_hold(void)
int button_read_device(int *data)
{
int ret = 0;
static int old_data = 0;
data = old_data;
/* Filter button events out if HOLD button is pressed at firmware/ level */
if(button_hold())
@ -181,6 +184,8 @@ int button_read_device(int *data)
ret |= touchscreen_to_pixels(cur_touch >> 16, cur_touch & 0xFFFF, data);
if( UNLIKELY(!is_backlight_on(true)) )
*data = 0;
old_data = data;
}
return ret;