From 73336e9729df94c97838522440e39cbaaa1e7b00 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Thu, 2 Aug 2007 12:13:20 +0000 Subject: [PATCH] Finally use the rec button to get to the rec screen on sansa and iriver hxxx. hold rec to get there... short press still is unused git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14141 a1c6a512-1295-4272-9138-f99709370657 --- apps/action.h | 2 ++ apps/gui/gwps.c | 10 +++++++++- apps/keymaps/keymap-e200.c | 2 ++ apps/keymaps/keymap-h1x0_h3x0.c | 2 ++ apps/menu.c | 8 ++++++++ apps/tree.c | 5 +++++ 6 files changed, 28 insertions(+), 1 deletion(-) diff --git a/apps/action.h b/apps/action.h index 5beacaa0e2..9859c2c50c 100644 --- a/apps/action.h +++ b/apps/action.h @@ -91,6 +91,7 @@ enum { ACTION_STD_MENU, ACTION_STD_QUICKSCREEN, ACTION_STD_KEYLOCK, + ACTION_STD_REC, ACTION_F3, /* just so everything works again, possibly change me */ /* code context actions */ @@ -111,6 +112,7 @@ enum { ACTION_WPS_CONTEXT, ACTION_WPS_QUICKSCREEN,/* optional */ ACTION_WPS_MENU, /*this should be the same as ACTION_STD_MENU */ + ACTION_WPS_REC, #if 0 ACTION_WPSAB_SINGLE, /* This needs to be #defined in the config-.h to one of the ACTION_WPS_ actions diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c index 714dfe8ee9..3defead099 100644 --- a/apps/gui/gwps.c +++ b/apps/gui/gwps.c @@ -618,7 +618,11 @@ long gui_wps_show(void) update_track = true; ffwd_rew(button); /* hopefully fix the ffw/rwd bug */ break; - +#ifdef HAVE_RECORDING + case ACTION_WPS_REC: + exit = true; + break; +#endif case SYS_POWEROFF: bookmark_autobookmark(); #if LCD_DEPTH > 1 @@ -676,6 +680,10 @@ long gui_wps_show(void) audio_stop(); #ifdef AB_REPEAT_ENABLE ab_reset_markers(); +#endif +#ifdef HAVE_RECORDING + if (button == ACTION_WPS_REC) + return GO_TO_RECSCREEN; #endif if (global_settings.browse_current) return GO_TO_PREVIOUS_BROWSER; diff --git a/apps/keymaps/keymap-e200.c b/apps/keymaps/keymap-e200.c index 318f495abe..8ba7e72507 100644 --- a/apps/keymaps/keymap-e200.c +++ b/apps/keymaps/keymap-e200.c @@ -37,6 +37,7 @@ static const struct button_mapping button_context_standard[] = { { ACTION_STD_NEXTREPEAT, BUTTON_SCROLL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_STD_MENU, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, + { ACTION_STD_REC, BUTTON_REC|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, { ACTION_STD_OK, BUTTON_RIGHT, BUTTON_NONE }, @@ -76,6 +77,7 @@ static const struct button_mapping button_context_wps[] = { { ACTION_WPS_QUICKSCREEN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_DOWN }, { ACTION_WPS_MENU, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, + { ACTION_WPS_REC, BUTTON_REC|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_WPS_PITCHSCREEN, BUTTON_SELECT|BUTTON_UP, BUTTON_SELECT }, { ACTION_WPS_ID3SCREEN, BUTTON_SELECT|BUTTON_DOWN, BUTTON_SELECT }, diff --git a/apps/keymaps/keymap-h1x0_h3x0.c b/apps/keymaps/keymap-h1x0_h3x0.c index 0f5911aac7..4ebdfaadc3 100644 --- a/apps/keymaps/keymap-h1x0_h3x0.c +++ b/apps/keymaps/keymap-h1x0_h3x0.c @@ -61,6 +61,7 @@ static const struct button_mapping button_context_standard[] = { { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, { ACTION_STD_OK, BUTTON_RIGHT, BUTTON_NONE }, { ACTION_STD_OK, BUTTON_ON|BUTTON_REL, BUTTON_NONE }, + { ACTION_STD_REC, BUTTON_REC|BUTTON_REPEAT, BUTTON_NONE }, LAST_ITEM_IN_LIST }; /* button_context_standard */ @@ -88,6 +89,7 @@ static const struct button_mapping button_context_wps[] = { { ACTION_WPS_BROWSE, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, { ACTION_WPS_ABRESET, BUTTON_ON|BUTTON_SELECT, BUTTON_ON }, { ACTION_WPS_ID3SCREEN, BUTTON_ON|BUTTON_MODE, BUTTON_NONE }, + { ACTION_WPS_REC, BUTTON_REC|BUTTON_REPEAT, BUTTON_NONE }, LAST_ITEM_IN_LIST }; /* button_context_wps */ diff --git a/apps/menu.c b/apps/menu.c index 60f2424cae..0b6be4c706 100644 --- a/apps/menu.c +++ b/apps/menu.c @@ -340,6 +340,14 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected) continue; } +#ifdef HAVE_RECORDING + if (action == ACTION_STD_REC) + { + ret = GO_TO_RECSCREEN; + done = true; + } + else +#endif if (action == ACTION_TREE_WPS) { ret = GO_TO_PREVIOUS_MUSIC; diff --git a/apps/tree.c b/apps/tree.c index 9ebf91d18e..5a4292d34c 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -630,6 +630,11 @@ static int dirbrowse() return GO_TO_ROOT; break; +#ifdef HAVE_RECORDING + case ACTION_STD_REC: + return GO_TO_RECSCREEN; +#endif + case ACTION_TREE_WPS: return GO_TO_PREVIOUS_MUSIC; break;