summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2009-08-02 07:05:30 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2009-08-02 07:05:30 +0000
commit0131a3873e0cb05bd357326b441f2cbc1884c657 (patch)
treebf224f3e36c3b052f3583d5692eae12d9c922f55 /firmware
parente9b061a7174298c61dd1f935a38654e07f573197 (diff)
downloadrockbox-0131a3873e0cb05bd357326b441f2cbc1884c657.tar.gz
rockbox-0131a3873e0cb05bd357326b441f2cbc1884c657.tar.bz2
rockbox-0131a3873e0cb05bd357326b441f2cbc1884c657.zip
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
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c
index 4def88c4f8..04acb71e45 100644
--- a/firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c
+++ b/firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c
@@ -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);
}