From 83d589dad1a0a96f3844d68b24d29c9b0f31e650 Mon Sep 17 00:00:00 2001 From: Tomer Shalev Date: Wed, 24 Feb 2010 21:16:48 +0000 Subject: [PATCH] Rockblox: Map touchscreen top-middle to rotate CW - Add support for defining a secondary 'rotate CCW' action - could be needed by future touchscreen targets - Update manual accordingly git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24895 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/rockblox.c | 16 ++++++++++------ manual/plugins/rockblox.tex | 6 +++--- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c index 52da4b25e8..e99fcc16e0 100644 --- a/apps/plugins/rockblox.c +++ b/apps/plugins/rockblox.c @@ -249,6 +249,7 @@ PLUGIN_HEADER #define ROCKBLOX_RESTART BUTTON_RC_MODE #elif CONFIG_KEYPAD == COWON_D2_PAD + #define ROCKBLOX_OFF BUTTON_POWER #define ROCKBLOX_RESTART BUTTON_MENU @@ -342,6 +343,7 @@ PLUGIN_HEADER #define ROCKBLOX_ROTATE_CW2 BUTTON_BOTTOMRIGHT #else #define ROCKBLOX_ROTATE_CW BUTTON_BOTTOMRIGHT +#define ROCKBLOX_ROTATE_CW2 BUTTON_TOPMIDDLE #endif #ifndef ROCKBLOX_DOWN #define ROCKBLOX_DOWN BUTTON_BOTTOMMIDDLE @@ -1371,6 +1373,10 @@ static int rockblox_loop (void) /* if it's enabled, go ahead and rotate.. */ if(wheel_enabled) +#endif +#ifdef ROCKBLOX_ROTATE_CCW2 + /* fallback */ + case ROCKBLOX_ROTATE_CCW2: #endif move_block (0, 0, (rockblox_status.co + 1) % figures[rockblox_status.cf].max_or); break; @@ -1382,18 +1388,16 @@ static int rockblox_loop (void) wheel_events++; if(wheel_enabled) +#endif +#ifdef ROCKBLOX_ROTATE_CW2 + /* fallback */ + case ROCKBLOX_ROTATE_CW2: #endif move_block (0, 0, (rockblox_status.co + figures[rockblox_status.cf].max_or - 1) % figures[rockblox_status.cf].max_or); break; -#ifdef ROCKBLOX_ROTATE_CCW2 - case ROCKBLOX_ROTATE_CCW2: - move_block (0, 0, (rockblox_status.co + 1) % figures[rockblox_status.cf].max_or); - break; -#endif - case ROCKBLOX_DOWN: case ROCKBLOX_DOWN | BUTTON_REPEAT: move_block (0, 1, rockblox_status.co); diff --git a/manual/plugins/rockblox.tex b/manual/plugins/rockblox.tex index 2eb3222c5b..73786dbd1d 100644 --- a/manual/plugins/rockblox.tex +++ b/manual/plugins/rockblox.tex @@ -61,7 +61,7 @@ the blocks fall faster. If the pile of blocks reaches the ceiling, the game is o \opt{MROBE100_PAD}{\ButtonMenu} \opt{COWON_D2_PAD}{\TouchBottomLeft} \opt{HAVEREMOTEKEYMAP}{& } - & Rotate left\\ + & Rotate CCW\\ \opt{PLAYER_PAD}{\ButtonPlay} \opt{RECORDER_PAD,ONDIO_PAD,IRIVER_H100_PAD,IRIVER_H300_PAD,IAUDIO_X5_PAD} {\ButtonUp} @@ -71,9 +71,9 @@ the blocks fall faster. If the pile of blocks reaches the ceiling, the game is o \opt{SANSA_C200_PAD}{\ButtonVolUp/\ButtonUp} \opt{GIGABEAT_PAD,GIGABEAT_S_PAD}{\ButtonVolDown} \opt{MROBE100_PAD}{\ButtonPlay} - \opt{COWON_D2_PAD}{\TouchBottomRight} + \opt{COWON_D2_PAD}{\TouchBottomRight{} / \TouchTopMiddle } \opt{HAVEREMOTEKEYMAP}{& } - & Rotate right\\ + & Rotate CW\\ \opt{PLAYER_PAD,RECORDER_PAD}{\ButtonOn} \opt{ONDIO_PAD}{\ButtonMenu} \opt{IRIVER_H100_PAD,IRIVER_H300_PAD}{\ButtonMode}