diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2008-07-10 05:24:02 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2008-07-10 05:24:02 +0000 |
| commit | 349ee09216d6c47b95f5667d75e84d3b68e058b0 (patch) | |
| tree | 18c92f34cf38ef5898a182d834703067f9feff1f /apps | |
| parent | 5cb85a81d298d4f8d27b7e7e5e0038f2032c75fa (diff) | |
| download | rockbox-349ee09216d6c47b95f5667d75e84d3b68e058b0.zip rockbox-349ee09216d6c47b95f5667d75e84d3b68e058b0.tar.gz rockbox-349ee09216d6c47b95f5667d75e84d3b68e058b0.tar.bz2 rockbox-349ee09216d6c47b95f5667d75e84d3b68e058b0.tar.xz | |
Save a bit of binary size on targets which cannot record but share keymap with ones that can (Ondio SP, iPod G1/G2, Minis, and currently iPod G3).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18007 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/keymaps/keymap-ipod.c | 4 | ||||
| -rw-r--r-- | apps/keymaps/keymap-ondio.c | 12 |
2 files changed, 13 insertions, 3 deletions
diff --git a/apps/keymaps/keymap-ipod.c b/apps/keymaps/keymap-ipod.c index 79a7f8e..a6026d3 100644 --- a/apps/keymaps/keymap-ipod.c +++ b/apps/keymaps/keymap-ipod.c @@ -167,6 +167,7 @@ static const struct button_mapping button_context_keyboard[] = { LAST_ITEM_IN_LIST }; /* button_context_keyboard */ +#ifdef HAVE_RECORDING const struct button_mapping button_context_recscreen[] = { { ACTION_REC_NEWFILE, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY }, @@ -184,6 +185,7 @@ const struct button_mapping button_context_recscreen[] = { LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) }; /* button_context_recscreen */ +#endif /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */ const struct button_mapping* get_context_mapping(int context) @@ -222,8 +224,10 @@ const struct button_mapping* get_context_mapping(int context) return button_context_pitchscreen; case CONTEXT_KEYBOARD: return button_context_keyboard; +#ifdef HAVE_RECORDING case CONTEXT_RECSCREEN: return button_context_recscreen; +#endif default: return button_context_standard; } diff --git a/apps/keymaps/keymap-ondio.c b/apps/keymaps/keymap-ondio.c index 39a8b55..6c76d56 100644 --- a/apps/keymaps/keymap-ondio.c +++ b/apps/keymaps/keymap-ondio.c @@ -136,6 +136,7 @@ static const struct button_mapping button_context_pitchscreen[] = { LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) }; /* button_context_pitchscreen */ +#ifdef HAVE_RECORDING static const struct button_mapping button_context_recscreen[] = { { ACTION_REC_PAUSE, BUTTON_MENU|BUTTON_REL, BUTTON_MENU }, { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE }, @@ -145,6 +146,7 @@ static const struct button_mapping button_context_recscreen[] = { LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) }; /* button_context_recscreen */ +#endif static const struct button_mapping button_context_keyboard[] = { { ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE }, @@ -161,6 +163,7 @@ static const struct button_mapping button_context_keyboard[] = { LAST_ITEM_IN_LIST }; /* button_context_keyboard */ + #if CONFIG_TUNER static const struct button_mapping button_context_radio[] = { { ACTION_FM_MENU, BUTTON_MENU | BUTTON_REPEAT, BUTTON_NONE }, @@ -172,13 +175,14 @@ static const struct button_mapping button_context_radio[] = { { ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_STD_NEXT, BUTTON_RIGHT, BUTTON_NONE }, { ACTION_STD_NEXTREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, - - + + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) - + }; #endif + const struct button_mapping* get_context_mapping( int context ) { switch( context ) @@ -206,9 +210,11 @@ const struct button_mapping* get_context_mapping( int context ) /* else fall through to CUSTOM|CONTEXT_TREE */ case CONTEXT_CUSTOM|CONTEXT_TREE: return button_context_tree; +#ifdef HAVE_RECORDING case CONTEXT_RECSCREEN: case CONTEXT_SETTINGS_RECTRIGGER: return button_context_recscreen; +#endif case CONTEXT_KEYBOARD: return button_context_keyboard; #if CONFIG_TUNER |