From 20e9d56ba5507021bdde898f4b0a0eb14f2af861 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Thu, 20 May 2010 17:41:28 +0000 Subject: 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 --- apps/plugins/jackpot.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apps/plugins/jackpot.c') diff --git a/apps/plugins/jackpot.c b/apps/plugins/jackpot.c index 302c5c6..56c2910 100644 --- a/apps/plugins/jackpot.c +++ b/apps/plugins/jackpot.c @@ -25,7 +25,7 @@ PLUGIN_HEADER -const struct button_mapping* plugin_contexts[]={generic_actions}; +const struct button_mapping* plugin_contexts[]={pla_main_ctx}; #define NB_PICTURES 9 #define NB_SLOTS 3 @@ -313,12 +313,12 @@ enum plugin_status plugin_start(const void* parameter) while (true) { action = pluginlib_getaction(TIMEOUT_BLOCK, - plugin_contexts, 1); + plugin_contexts, ARRAYLEN(plugin_contexts)); switch ( action ) { - case PLA_QUIT: + case PLA_CANCEL: return PLUGIN_OK; - case PLA_FIRE: + case PLA_SELECT: jackpot_play_turn(&game); break; -- cgit v1.1