diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2010-05-20 17:41:28 +0000 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2010-05-20 17:41:28 +0000 |
| commit | 20e9d56ba5507021bdde898f4b0a0eb14f2af861 (patch) | |
| tree | 20a1ff36d0cc0f530bc7c7648b1bca2f9127a5c8 /apps/plugins/dice.c | |
| parent | 97365803d390e44155fc41657bd03a7b121956aa (diff) | |
| download | rockbox-20e9d56ba5507021bdde898f4b0a0eb14f2af861.zip rockbox-20e9d56ba5507021bdde898f4b0a0eb14f2af861.tar.gz rockbox-20e9d56ba5507021bdde898f4b0a0eb14f2af861.tar.bz2 rockbox-20e9d56ba5507021bdde898f4b0a0eb14f2af861.tar.xz | |
S#10387 - Rework pluginlib actions
It changes pluginlib actions to contain only a single and simple context (and
other one for remote directional buttons),
consisting of 7(9) buttons: up/down/left/right, select OR short select and long
select, exit and cancel (plus 2 for scrollwheel targets).
This ensures contexts don't clash with other contexts and simplifies them, at
the expense of reduced versatility. However, the versatility made it largely unusable
due to the great number of targets.
This should allow for using pluginlib actions safely for the most simple plugins (e.g. almost all demos).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26202 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/dice.c')
| -rw-r--r-- | apps/plugins/dice.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/plugins/dice.c b/apps/plugins/dice.c index bee9f89..7bd5112 100644 --- a/apps/plugins/dice.c +++ b/apps/plugins/dice.c @@ -28,13 +28,13 @@ #define INITIAL_NB_DICES 1 #define INITIAL_NB_SIDES 2 /* corresponds to 6 sides in the array */ -#define DICE_QUIT PLA_QUIT -#define DICE_ROLL PLA_START +#define DICE_QUIT PLA_CANCEL +#define DICE_ROLL PLA_SELECT #define CFG_FILE "dice.cfg" -const struct button_mapping* plugin_contexts[]={generic_actions}; +const struct button_mapping* plugin_contexts[]={pla_main_ctx}; struct dices { @@ -94,7 +94,7 @@ enum plugin_status plugin_start(const void* parameter) { dice_print( &dice, rb->screens[i] ); while(true) { action = pluginlib_getaction(TIMEOUT_BLOCK, - plugin_contexts, 1); + plugin_contexts, ARRAYLEN(plugin_contexts)); switch(action) { case DICE_ROLL: dice_roll(&dice); |