summaryrefslogtreecommitdiff
path: root/apps/action.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/action.c')
-rw-r--r--apps/action.c37
1 files changed, 22 insertions, 15 deletions
diff --git a/apps/action.c b/apps/action.c
index f9602b967f..34897b938c 100644
--- a/apps/action.c
+++ b/apps/action.c
@@ -675,24 +675,31 @@ static inline int do_auto_softlock(action_last_t *last, action_cur_t *cur)
675 } 675 }
676 else if (action == ACTION_STD_KEYLOCK) 676 else if (action == ACTION_STD_KEYLOCK)
677 { 677 {
678 last->unlock_combo = cur->button;/* set unlock combo to allow unlock */ 678 if (!has_flag(last->softlock_mask, SEL_ACTION_ALWAYSAUTOLOCK)) // normal operation, clear/arm autolock
679 last->softlock_mask ^= SEL_ACTION_ALOCK_OK;
680 action_handle_backlight(true, false);
681 /* If we don't wait for a moment for the backlight queue
682 * to process, the user will never see the message */
683 if (!is_backlight_on(false))
684 { 679 {
685 sleep(HZ/2); 680 last->unlock_combo = cur->button;/* set unlock combo to allow unlock */
686 } 681 last->softlock_mask ^= SEL_ACTION_ALOCK_OK;
682 action_handle_backlight(true, false);
683 /* If we don't wait for a moment for the backlight queue
684 * to process, the user will never see the message */
685 if (!is_backlight_on(false))
686 {
687 sleep(HZ/2);
688 }
687 689
688 if (has_flag(last->softlock_mask, SEL_ACTION_ALOCK_OK)) 690 if (has_flag(last->softlock_mask, SEL_ACTION_ALOCK_OK))
689 { 691 {
690 splash(HZ/2, ID2P(LANG_ACTION_AUTOLOCK_ON)); 692 splash(HZ/2, ID2P(LANG_ACTION_AUTOLOCK_ON));
691 action = ACTION_REDRAW; 693 action = ACTION_REDRAW;
692 } 694 }
693 else 695 else
696 {
697 splash(HZ/2, ID2P(LANG_ACTION_AUTOLOCK_OFF));
698 }
699 } else if (!has_flag(last->softlock_mask, SEL_ACTION_ALOCK_OK)) // always autolock, but not currently armed
694 { 700 {
695 splash(HZ/2, ID2P(LANG_ACTION_AUTOLOCK_OFF)); 701 last->unlock_combo = cur->button;/* set unlock combo to allow unlock */
702 last->softlock_mask ^= SEL_ACTION_ALOCK_OK;
696 } 703 }
697 } 704 }
698 705