mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
Pluginlib: Add support for general buttons. Add menu and quit buttons to Reversi. MRobe 500: Modify touch handler to return the previous data always rather than 0 when there is no touch.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22110 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e9b061a717
commit
0131a3873e
12 changed files with 439 additions and 220 deletions
|
|
@ -110,16 +110,17 @@ inline bool button_hold(void)
|
|||
|
||||
int button_read_device(int *data)
|
||||
{
|
||||
static int old_data;
|
||||
int button_read = BUTTON_NONE;
|
||||
short touch_x, touch_y, touch_z1, touch_z2;
|
||||
static bool hold_button_old = false;
|
||||
|
||||
*data = 0;
|
||||
*data = old_data;
|
||||
|
||||
/* Handle touchscreen */
|
||||
if (tsc2100_read_touch(&touch_x, &touch_y, &touch_z1, &touch_z2))
|
||||
{
|
||||
*data = touch_to_pixels(&touch_x, &touch_y);
|
||||
old_data = *data = touch_to_pixels(&touch_x, &touch_y);
|
||||
button_read |= touchscreen_to_pixels(touch_x, touch_y, data);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue