mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
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:
parent
65eaf60b35
commit
7ca4c7358d
3 changed files with 15 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue