forked from len0rd/rockbox
Clock plugin : added the repeat action to the mode/skin change button mappings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14195 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1ea6daf01e
commit
9d1e5e4d85
1 changed files with 9 additions and 0 deletions
|
@ -38,15 +38,20 @@ const struct button_mapping* plugin_contexts[]={
|
||||||
remote_directions
|
remote_directions
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NB_ACTION_CONTEXTS sizeof(plugin_contexts)/sizeof(plugin_contexts[0])
|
#define NB_ACTION_CONTEXTS sizeof(plugin_contexts)/sizeof(plugin_contexts[0])
|
||||||
#define ACTION_COUNTER_TOGGLE PLA_FIRE
|
#define ACTION_COUNTER_TOGGLE PLA_FIRE
|
||||||
#define ACTION_COUNTER_RESET PLA_FIRE_REPEAT
|
#define ACTION_COUNTER_RESET PLA_FIRE_REPEAT
|
||||||
#define ACTION_MENU PLA_MENU
|
#define ACTION_MENU PLA_MENU
|
||||||
#define ACTION_EXIT PLA_QUIT
|
#define ACTION_EXIT PLA_QUIT
|
||||||
#define ACTION_MODE_NEXT PLA_RIGHT
|
#define ACTION_MODE_NEXT PLA_RIGHT
|
||||||
|
#define ACTION_MODE_NEXT_REPEAT PLA_RIGHT_REPEAT
|
||||||
#define ACTION_MODE_PREV PLA_LEFT
|
#define ACTION_MODE_PREV PLA_LEFT
|
||||||
|
#define ACTION_MODE_PREV_REPEAT PLA_LEFT_REPEAT
|
||||||
#define ACTION_SKIN_NEXT PLA_UP
|
#define ACTION_SKIN_NEXT PLA_UP
|
||||||
|
#define ACTION_SKIN_NEXT_REPEAT PLA_UP_REPEAT
|
||||||
#define ACTION_SKIN_PREV PLA_DOWN
|
#define ACTION_SKIN_PREV PLA_DOWN
|
||||||
|
#define ACTION_SKIN_PREV_REPEAT PLA_DOWN_REPEAT
|
||||||
|
|
||||||
extern struct plugin_api* rb;
|
extern struct plugin_api* rb;
|
||||||
|
|
||||||
|
@ -147,20 +152,24 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter){
|
||||||
counter_reset(&counter);
|
counter_reset(&counter);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ACTION_MODE_NEXT_REPEAT:
|
||||||
case ACTION_MODE_NEXT:
|
case ACTION_MODE_NEXT:
|
||||||
clock_settings.mode++;
|
clock_settings.mode++;
|
||||||
if(clock_settings.mode >= NB_CLOCK_MODES)
|
if(clock_settings.mode >= NB_CLOCK_MODES)
|
||||||
clock_settings.mode = 0;
|
clock_settings.mode = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ACTION_MODE_PREV_REPEAT:
|
||||||
case ACTION_MODE_PREV:
|
case ACTION_MODE_PREV:
|
||||||
clock_settings.mode--;
|
clock_settings.mode--;
|
||||||
if(clock_settings.mode < 0)
|
if(clock_settings.mode < 0)
|
||||||
clock_settings.mode = NB_CLOCK_MODES-1;
|
clock_settings.mode = NB_CLOCK_MODES-1;
|
||||||
break;
|
break;
|
||||||
|
case ACTION_SKIN_PREV_REPEAT:
|
||||||
case ACTION_SKIN_PREV:
|
case ACTION_SKIN_PREV:
|
||||||
clock_settings_skin_next(&clock_settings);
|
clock_settings_skin_next(&clock_settings);
|
||||||
break;
|
break;
|
||||||
|
case ACTION_SKIN_NEXT_REPEAT:
|
||||||
case ACTION_SKIN_NEXT:
|
case ACTION_SKIN_NEXT:
|
||||||
clock_settings_skin_previous(&clock_settings);
|
clock_settings_skin_previous(&clock_settings);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue