1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Michael Sevakis 2012-03-03 07:52:13 -05:00
parent f688710707
commit d05db0a90c
6 changed files with 6 additions and 11 deletions

View file

@ -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;

View file

@ -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,

View file

@ -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 */

View file

@ -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);

View file

@ -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 */

View file

@ -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);
}