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 | |
parent | 5cb85a81d298d4f8d27b7e7e5e0038f2032c75fa (diff) | |
download | rockbox-349ee09216d6c47b95f5667d75e84d3b68e058b0.tar.gz rockbox-349ee09216d6c47b95f5667d75e84d3b68e058b0.zip |
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
-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 79a7f8ee82..a6026d3f6d 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[] = { | |||
167 | LAST_ITEM_IN_LIST | 167 | LAST_ITEM_IN_LIST |
168 | }; /* button_context_keyboard */ | 168 | }; /* button_context_keyboard */ |
169 | 169 | ||
170 | #ifdef HAVE_RECORDING | ||
170 | const struct button_mapping button_context_recscreen[] = { | 171 | const struct button_mapping button_context_recscreen[] = { |
171 | 172 | ||
172 | { ACTION_REC_NEWFILE, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY }, | 173 | { ACTION_REC_NEWFILE, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY }, |
@@ -184,6 +185,7 @@ const struct button_mapping button_context_recscreen[] = { | |||
184 | 185 | ||
185 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | 186 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
186 | }; /* button_context_recscreen */ | 187 | }; /* button_context_recscreen */ |
188 | #endif | ||
187 | 189 | ||
188 | /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */ | 190 | /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */ |
189 | const struct button_mapping* get_context_mapping(int context) | 191 | const struct button_mapping* get_context_mapping(int context) |
@@ -222,8 +224,10 @@ const struct button_mapping* get_context_mapping(int context) | |||
222 | return button_context_pitchscreen; | 224 | return button_context_pitchscreen; |
223 | case CONTEXT_KEYBOARD: | 225 | case CONTEXT_KEYBOARD: |
224 | return button_context_keyboard; | 226 | return button_context_keyboard; |
227 | #ifdef HAVE_RECORDING | ||
225 | case CONTEXT_RECSCREEN: | 228 | case CONTEXT_RECSCREEN: |
226 | return button_context_recscreen; | 229 | return button_context_recscreen; |
230 | #endif | ||
227 | default: | 231 | default: |
228 | return button_context_standard; | 232 | return button_context_standard; |
229 | } | 233 | } |
diff --git a/apps/keymaps/keymap-ondio.c b/apps/keymaps/keymap-ondio.c index 39a8b55a1f..6c76d56022 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[] = { | |||
136 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | 136 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
137 | }; /* button_context_pitchscreen */ | 137 | }; /* button_context_pitchscreen */ |
138 | 138 | ||
139 | #ifdef HAVE_RECORDING | ||
139 | static const struct button_mapping button_context_recscreen[] = { | 140 | static const struct button_mapping button_context_recscreen[] = { |
140 | { ACTION_REC_PAUSE, BUTTON_MENU|BUTTON_REL, BUTTON_MENU }, | 141 | { ACTION_REC_PAUSE, BUTTON_MENU|BUTTON_REL, BUTTON_MENU }, |
141 | { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE }, | 142 | { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE }, |
@@ -145,6 +146,7 @@ static const struct button_mapping button_context_recscreen[] = { | |||
145 | 146 | ||
146 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | 147 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
147 | }; /* button_context_recscreen */ | 148 | }; /* button_context_recscreen */ |
149 | #endif | ||
148 | 150 | ||
149 | static const struct button_mapping button_context_keyboard[] = { | 151 | static const struct button_mapping button_context_keyboard[] = { |
150 | { ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE }, | 152 | { ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE }, |
@@ -161,6 +163,7 @@ static const struct button_mapping button_context_keyboard[] = { | |||
161 | 163 | ||
162 | LAST_ITEM_IN_LIST | 164 | LAST_ITEM_IN_LIST |
163 | }; /* button_context_keyboard */ | 165 | }; /* button_context_keyboard */ |
166 | |||
164 | #if CONFIG_TUNER | 167 | #if CONFIG_TUNER |
165 | static const struct button_mapping button_context_radio[] = { | 168 | static const struct button_mapping button_context_radio[] = { |
166 | { ACTION_FM_MENU, BUTTON_MENU | BUTTON_REPEAT, BUTTON_NONE }, | 169 | { ACTION_FM_MENU, BUTTON_MENU | BUTTON_REPEAT, BUTTON_NONE }, |
@@ -172,13 +175,14 @@ static const struct button_mapping button_context_radio[] = { | |||
172 | { ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | 175 | { ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, |
173 | { ACTION_STD_NEXT, BUTTON_RIGHT, BUTTON_NONE }, | 176 | { ACTION_STD_NEXT, BUTTON_RIGHT, BUTTON_NONE }, |
174 | { ACTION_STD_NEXTREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | 177 | { ACTION_STD_NEXTREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, |
175 | 178 | ||
176 | 179 | ||
177 | 180 | ||
178 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) | 181 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) |
179 | 182 | ||
180 | }; | 183 | }; |
181 | #endif | 184 | #endif |
185 | |||
182 | const struct button_mapping* get_context_mapping( int context ) | 186 | const struct button_mapping* get_context_mapping( int context ) |
183 | { | 187 | { |
184 | switch( context ) | 188 | switch( context ) |
@@ -206,9 +210,11 @@ const struct button_mapping* get_context_mapping( int context ) | |||
206 | /* else fall through to CUSTOM|CONTEXT_TREE */ | 210 | /* else fall through to CUSTOM|CONTEXT_TREE */ |
207 | case CONTEXT_CUSTOM|CONTEXT_TREE: | 211 | case CONTEXT_CUSTOM|CONTEXT_TREE: |
208 | return button_context_tree; | 212 | return button_context_tree; |
213 | #ifdef HAVE_RECORDING | ||
209 | case CONTEXT_RECSCREEN: | 214 | case CONTEXT_RECSCREEN: |
210 | case CONTEXT_SETTINGS_RECTRIGGER: | 215 | case CONTEXT_SETTINGS_RECTRIGGER: |
211 | return button_context_recscreen; | 216 | return button_context_recscreen; |
217 | #endif | ||
212 | case CONTEXT_KEYBOARD: | 218 | case CONTEXT_KEYBOARD: |
213 | return button_context_keyboard; | 219 | return button_context_keyboard; |
214 | #if CONFIG_TUNER | 220 | #if CONFIG_TUNER |