summaryrefslogtreecommitdiff
path: root/apps/misc.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2012-03-03 07:10:56 -0500
committerMichael Sevakis <jethead71@rockbox.org>2012-03-03 07:10:56 -0500
commitf688710707f3af56a5949b8ae3957c9408b25392 (patch)
tree5e0a15f00d66337123406c09c207f531a4c18eca /apps/misc.c
parenta92696d40d3515d4391ffba043894ebbad80cab6 (diff)
downloadrockbox-f688710707f3af56a5949b8ae3957c9408b25392.zip
rockbox-f688710707f3af56a5949b8ae3957c9408b25392.tar.gz
rockbox-f688710707f3af56a5949b8ae3957c9408b25392.tar.bz2
rockbox-f688710707f3af56a5949b8ae3957c9408b25392.tar.xz
Change keyclick_click so that it may accept raw buttons or actions.
Adds a new context, CONTEXT_RAWBUTTON, that I hope is out of the way of everything. Unfortunately have to increment min plugin API version for the second time today to accomodate additional parameter. Change-Id: Iaa46b926e57cf377fd4906f2d42bb98e87215033
Diffstat (limited to 'apps/misc.c')
-rw-r--r--apps/misc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/misc.c b/apps/misc.c
index 3fe330b..78ee154 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -887,13 +887,15 @@ void keyclick_set_callback(keyclick_callback cb, void* data)
}
/* Produce keyclick based upon button and global settings */
-void keyclick_click(int action)
+void keyclick_click(int context, int action)
{
- int button;
+ int button = action;
static long last_button = BUTTON_NONE;
bool do_beep = false;
- get_action_statuscode(&button);
+ if (!(context & CONTEXT_RAWBUTTON))
+ get_action_statuscode(&button);
+
/* Settings filters */
if (
#ifdef HAVE_HARDWARE_CLICK