diff options
| author | Martin Scarratt <mmmm@rockbox.org> | 2006-09-22 12:18:58 +0000 |
|---|---|---|
| committer | Martin Scarratt <mmmm@rockbox.org> | 2006-09-22 12:18:58 +0000 |
| commit | a982365711606589e41a8fcaab0adb2aa1ab89ee (patch) | |
| tree | ffc614cb7cbd8e61c9b8156da30377300959e1be /apps/keymaps | |
| parent | c70b390f11c492f5bff8b1a5b21c41063f5f7865 (diff) | |
| download | rockbox-a982365711606589e41a8fcaab0adb2aa1ab89ee.zip rockbox-a982365711606589e41a8fcaab0adb2aa1ab89ee.tar.gz rockbox-a982365711606589e41a8fcaab0adb2aa1ab89ee.tar.bz2 rockbox-a982365711606589e41a8fcaab0adb2aa1ab89ee.tar.xz | |
Button action code implemented in the radio screen. Should get rid of all thos wierd doublepress bugs and you can edit your presets again.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11024 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/keymaps')
| -rw-r--r-- | apps/keymaps/keymap-h1x0_h3x0.c | 40 | ||||
| -rw-r--r-- | apps/keymaps/keymap-ondio.c | 11 | ||||
| -rw-r--r-- | apps/keymaps/keymap-recorder.c | 15 | ||||
| -rw-r--r-- | apps/keymaps/keymap-x5.c | 12 |
4 files changed, 78 insertions, 0 deletions
diff --git a/apps/keymaps/keymap-h1x0_h3x0.c b/apps/keymaps/keymap-h1x0_h3x0.c index 0c0b61d..af52b5c 100644 --- a/apps/keymaps/keymap-h1x0_h3x0.c +++ b/apps/keymaps/keymap-h1x0_h3x0.c @@ -259,6 +259,18 @@ const struct button_mapping button_context_keyboard[] = { LAST_ITEM_IN_LIST }; /* button_context_keyboard */ +const struct button_mapping button_context_radio[] = { + { ACTION_FM_MENU, BUTTON_SELECT | BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_FM_PRESET, BUTTON_SELECT | BUTTON_REL, BUTTON_SELECT }, + { ACTION_FM_STOP, BUTTON_OFF, BUTTON_NONE }, + { ACTION_FM_MODE, BUTTON_ON | BUTTON_REPEAT, BUTTON_ON }, + { ACTION_FM_EXIT, BUTTON_MODE | BUTTON_REL, BUTTON_MODE }, + { ACTION_FM_PLAY, BUTTON_ON | BUTTON_REL, BUTTON_ON }, + + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) + +}; + /***************************************************************************** * Remote control mappings *****************************************************************************/ @@ -650,6 +662,21 @@ const struct button_mapping button_context_keyboard_h300lcdremote[] = { LAST_ITEM_IN_LIST }; /* button_context_keyboard_h300lcdremote */ +const struct button_mapping button_context_radio_h100remote[] = { + { ACTION_FM_MENU, BUTTON_RC_MENU | BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_FM_PRESET, BUTTON_RC_MENU | BUTTON_REL, BUTTON_RC_MENU }, + { ACTION_FM_STOP, BUTTON_RC_STOP, BUTTON_NONE }, + { ACTION_FM_MODE, BUTTON_RC_ON | BUTTON_REPEAT, BUTTON_RC_ON }, + { ACTION_FM_EXIT, BUTTON_RC_MODE | BUTTON_REL, BUTTON_RC_MODE }, + { ACTION_FM_PLAY, BUTTON_RC_ON | BUTTON_REL, BUTTON_RC_ON }, + { ACTION_FM_NEXT_PRESET, BUTTON_RC_BITRATE, BUTTON_NONE }, + { ACTION_FM_PREV_PRESET, BUTTON_RC_SOURCE, BUTTON_NONE }, + + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) +}; + +const struct button_mapping *button_context_radio_h300lcdremote = + button_context_radio_h100remote; /* the actual used tables */ static const struct button_mapping @@ -667,6 +694,7 @@ static const struct button_mapping *remote_btn_ctxt_pitchscreen = 0, *remote_btn_ctxt_recscreen = 0, *remote_btn_ctxt_keyboard = 0; + *remote_btn_ctxt_radio = 0; static int _remote_type = -1; /*safe value, forces the first press to init the mappings */ @@ -690,6 +718,7 @@ static void remap_remote(void) remote_btn_ctxt_pitchscreen = NULL; remote_btn_ctxt_recscreen = NULL; remote_btn_ctxt_keyboard = NULL; + remote_btn_ctxt_radio = NULL; break; case REMOTETYPE_H100_LCD: @@ -714,6 +743,8 @@ static void remap_remote(void) = button_context_recscreen_h100remote, remote_btn_ctxt_keyboard = button_context_keyboard_h100remote; + remote_btn_ctxt_radio + = button_context_radio_h100remote; break; case REMOTETYPE_H300_LCD: @@ -738,6 +769,8 @@ static void remap_remote(void) = button_context_recscreen_h300lcdremote, remote_btn_ctxt_keyboard = button_context_keyboard_h300lcdremote; + remote_btn_ctxt_radio + = button_context_radio_h300lcdremote; break; case REMOTETYPE_H300_NONLCD: /* FIXME: add its tables */ @@ -762,6 +795,8 @@ static void remap_remote(void) = button_context_recscreen_h300lcdremote, remote_btn_ctxt_keyboard = button_context_keyboard_h300lcdremote; + remote_btn_ctxt_radio + = button_context_radio_h300lcdremote; #if 0 remote_btn_ctxt_std = remote_btn_ctxt_wps = @@ -777,6 +812,7 @@ static void remap_remote(void) remote_btn_ctxt_pitchscreen = remote_btn_ctxt_recscreen = remote_btn_ctxt_keyboard = + remote_btn_ctxt_radio = #endif break; @@ -827,6 +863,8 @@ const struct button_mapping* get_context_mapping_remote(int context) return remote_btn_ctxt_recscreen; case CONTEXT_KEYBOARD: return remote_btn_ctxt_keyboard; + case CONTEXT_FM: + return remote_btn_ctxt_radio; } return remote_btn_ctxt_std; } @@ -879,6 +917,8 @@ const struct button_mapping* get_context_mapping(int context) return button_context_recscreen; case CONTEXT_KEYBOARD: return button_context_keyboard; + case CONTEXT_FM: + return button_context_radio; } return button_context_standard; } diff --git a/apps/keymaps/keymap-ondio.c b/apps/keymaps/keymap-ondio.c index ca1ae8d..80b6923 100644 --- a/apps/keymaps/keymap-ondio.c +++ b/apps/keymaps/keymap-ondio.c @@ -156,6 +156,17 @@ const struct button_mapping button_context_keyboard[] = { LAST_ITEM_IN_LIST }; /* button_context_keyboard */ +const struct button_mapping button_context_radio[] = { + { ACTION_FM_MENU, BUTTON_MENU | BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_FM_RECORD_DBLPRE, BUTTON_MENU, BUTTON_NONE}, + { ACTION_FM_RECORD, BUTTON_MENU | BUTTON_REL, BUTTON_NONE }, + { ACTION_FM_STOP, BUTTON_OFF | BUTTON_REL, BUTTON_OFF }, + { ACTION_FM_EXIT, BUTTON_OFF | BUTTON_REPEAT, BUTTON_OFF }, + + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) + +}; + const struct button_mapping* get_context_mapping( int context ) { switch( context ) diff --git a/apps/keymaps/keymap-recorder.c b/apps/keymaps/keymap-recorder.c index af28e51..489f9fb 100644 --- a/apps/keymaps/keymap-recorder.c +++ b/apps/keymaps/keymap-recorder.c @@ -191,7 +191,22 @@ struct button_mapping button_context_bmark[] = { { ACTION_BMS_SELECT, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD), + }; /* button_context_settings_bmark */ + +const struct button_mapping button_context_radio[] = { + { ACTION_FM_MENU, BUTTON_F1, BUTTON_NONE }, + { ACTION_FM_PRESET, BUTTON_F2, BUTTON_NONE }, + { ACTION_FM_RECORD, BUTTON_F3, BUTTON_NONE }, + { ACTION_FM_FREEZE, BUTTON_PLAY, BUTTON_NONE }, + { ACTION_FM_STOP, BUTTON_OFF, BUTTON_NONE }, + { ACTION_FM_MODE, BUTTON_ON | BUTTON_REPEAT, BUTTON_ON }, + { ACTION_FM_EXIT, BUTTON_ON | BUTTON_REL, BUTTON_ON }, + + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) + +}; + /***************************************************************************** * Remote control mappings *****************************************************************************/ diff --git a/apps/keymaps/keymap-x5.c b/apps/keymaps/keymap-x5.c index 05985fe..1ef7d6a 100644 --- a/apps/keymaps/keymap-x5.c +++ b/apps/keymaps/keymap-x5.c @@ -242,6 +242,18 @@ const struct button_mapping button_context_bmark[] = { LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), }; /* button_context_settings_bmark */ +const struct button_mapping button_context_radio[] = { + { ACTION_FM_MENU, BUTTON_SELECT | BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_FM_PRESET, BUTTON_SELECT | BUTTON_REL, BUTTON_SELECT }, + { ACTION_FM_STOP, BUTTON_POWER, BUTTON_NONE }, + { ACTION_FM_MODE, BUTTON_PLAY | BUTTON_REPEAT, BUTTON_PLAY }, + { ACTION_FM_EXIT, BUTTON_REC | BUTTON_REL, BUTTON_REC }, + { ACTION_FM_PLAY, BUTTON_PLAY | BUTTON_REL, BUTTON_PLAY }, + + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) + +}; + static const struct button_mapping* get_context_mapping_remote( int context ) { context ^= CONTEXT_REMOTE; |