From 30f237303b98a6a0ca72bfc66d12d1e6f07bf506 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Thu, 17 Aug 2006 08:57:38 +0000 Subject: bring back the Battery:Charging splash if you try turning off certain targets with AC connected git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10628 a1c6a512-1295-4272-9138-f99709370657 --- apps/keymaps/keymap-h1x0_h3x0.c | 7 ++++--- apps/tree.c | 18 ++++++++++-------- 2 files changed, 14 insertions(+), 11 deletions(-) (limited to 'apps') diff --git a/apps/keymaps/keymap-h1x0_h3x0.c b/apps/keymaps/keymap-h1x0_h3x0.c index 457431057e..1ca4316879 100644 --- a/apps/keymaps/keymap-h1x0_h3x0.c +++ b/apps/keymaps/keymap-h1x0_h3x0.c @@ -72,7 +72,7 @@ const struct button_mapping button_context_wps[] = { { ACTION_WPS_STOPSEEK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT }, { ACTION_WPS_ABSETB_NEXTDIR, BUTTON_ON|BUTTON_RIGHT, BUTTON_ON }, { ACTION_WPS_ABSETA_PREVDIR, BUTTON_ON|BUTTON_LEFT, BUTTON_ON }, - { ACTION_WPS_STOP, BUTTON_OFF, BUTTON_NONE }, + { ACTION_WPS_STOP, BUTTON_OFF|BUTTON_REL, BUTTON_OFF }, { ACTION_WPS_VOLDOWN, BUTTON_DOWN|BUTTON_REL, BUTTON_DOWN }, { ACTION_WPS_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_WPS_VOLUP, BUTTON_UP|BUTTON_REL, BUTTON_UP }, @@ -100,8 +100,9 @@ const struct button_mapping button_context_listtree[] = { }; /* button_context_listtree */ const struct button_mapping button_context_tree[] = { - { ACTION_TREE_WPS, BUTTON_ON|BUTTON_REL, BUTTON_ON }, - { ACTION_TREE_STOP, BUTTON_OFF, BUTTON_NONE }, + { ACTION_TREE_WPS, BUTTON_ON|BUTTON_REL, BUTTON_ON }, + { ACTION_TREE_STOP, BUTTON_OFF|BUTTON_REL, BUTTON_OFF }, + { ACTION_TREE_STOP, BUTTON_OFF|BUTTON_REPEAT, BUTTON_NONE }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST) }; /* button_context_listtree */ diff --git a/apps/tree.c b/apps/tree.c index 53797baa40..0616c0f09e 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -662,17 +662,19 @@ static bool dirbrowse(void) } #endif } - break; - /* ?? #if defined(CONFIG_CHARGING) && !defined(HAVE_POWEROFF_WHILE_CHARGING) - case TREE_OFF | BUTTON_REPEAT: - if (charger_inserted()) { - charging_splash(); - restore = true; +{ + static int last_off = 0; + if (current_tick - last_off < 50) { + if (charger_inserted()) { + charging_splash(); + restore = true; + } } - break; + last_off = current_tick; +} #endif - */ + break; /* case ACTION_TREE_STOP: */ case ACTION_STD_MENU: /* don't enter menu from plugin browser */ if (*tc.dirfilter < NUM_FILTER_MODES) -- cgit v1.2.3