summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2012-03-03 07:52:13 -0500
committerMichael Sevakis <jethead71@rockbox.org>2012-03-03 07:52:13 -0500
commitd05db0a90c7bce7e6830e77a16c63a90e9e572c4 (patch)
tree3af3b1406b2bc6a30f647abcc40865bee2f73022 /apps
parentf688710707f3af56a5949b8ae3957c9408b25392 (diff)
downloadrockbox-d05db0a90c7bce7e6830e77a16c63a90e9e572c4.tar.gz
rockbox-d05db0a90c7bce7e6830e77a16c63a90e9e572c4.zip
Correct actionable offense for misappropriation of action context.
Just use a bool to indicate raw button instead of action code. No bother with plugin version yet again so soon. Change-Id: I4aa075c0c1fb5308c9d49bebb30ac76f671b2335
Diffstat (limited to 'apps')
-rw-r--r--apps/action.c2
-rw-r--r--apps/action.h5
-rw-r--r--apps/misc.c4
-rw-r--r--apps/misc.h2
-rw-r--r--apps/plugin.h2
-rw-r--r--apps/plugins/mpegplayer/mpeg_misc.c2
6 files changed, 6 insertions, 11 deletions
diff --git a/apps/action.c b/apps/action.c
index 69089d1d8c..ee6cbaa4cf 100644
--- a/apps/action.c
+++ b/apps/action.c
@@ -368,7 +368,7 @@ static int get_action_worker(int context, int timeout,
#if CONFIG_CODEC == SWCODEC
/* Produce keyclick */
- keyclick_click(0, ret);
+ keyclick_click(false, ret);
#endif
return ret;
diff --git a/apps/action.h b/apps/action.h
index 1bffed3b75..e46e4a64b2 100644
--- a/apps/action.h
+++ b/apps/action.h
@@ -42,11 +42,6 @@
#define ALLOW_SOFTLOCK 0
#endif
-#define CONTEXT_RAWBUTTON 0x04000000 /* For passing raw button code to
- functions that normally take
- action codes
- (ie. keyclick_click) */
-
enum {
CONTEXT_STD = 0,
/* These CONTEXT_ values were here before me,
diff --git a/apps/misc.c b/apps/misc.c
index 78ee154c56..ca99a1d9ac 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -887,13 +887,13 @@ void keyclick_set_callback(keyclick_callback cb, void* data)
}
/* Produce keyclick based upon button and global settings */
-void keyclick_click(int context, int action)
+void keyclick_click(bool rawbutton, int action)
{
int button = action;
static long last_button = BUTTON_NONE;
bool do_beep = false;
- if (!(context & CONTEXT_RAWBUTTON))
+ if (!rawbutton)
get_action_statuscode(&button);
/* Settings filters */
diff --git a/apps/misc.h b/apps/misc.h
index 4ae7c19a32..8d0953985d 100644
--- a/apps/misc.h
+++ b/apps/misc.h
@@ -148,7 +148,7 @@ void system_sound_play(enum system_sound sound);
typedef bool (*keyclick_callback)(int action, void* data);
void keyclick_set_callback(keyclick_callback cb, void* data);
/* Produce keyclick based upon button and global settings */
-void keyclick_click(int context, int action);
+void keyclick_click(bool rawbutton, int action);
#endif /* CONFIG_CODEC == SWCODEC */
void push_current_activity(enum current_activity screen);
diff --git a/apps/plugin.h b/apps/plugin.h
index bddf23b5d2..cd2440abdc 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -705,7 +705,7 @@ struct plugin_api {
size_t (*mixer_channel_get_bytes_waiting)(enum pcm_mixer_channel channel);
void (*system_sound_play)(enum system_sound sound);
- void (*keyclick_click)(int context, int action);
+ void (*keyclick_click)(bool rawbutton, int action);
#endif /* CONFIG_CODEC == SWCODC */
/* playback control */
diff --git a/apps/plugins/mpegplayer/mpeg_misc.c b/apps/plugins/mpegplayer/mpeg_misc.c
index cbaca70646..fc7fb87fd6 100644
--- a/apps/plugins/mpegplayer/mpeg_misc.c
+++ b/apps/plugins/mpegplayer/mpeg_misc.c
@@ -216,7 +216,7 @@ int mpeg_button_get(int timeout)
rb->button_get_w_tmo(timeout);
/* Produce keyclick */
- rb->keyclick_click(CONTEXT_RAWBUTTON, button);
+ rb->keyclick_click(true, button);
return mpeg_sysevent_callback(button, NULL);
}