summaryrefslogtreecommitdiff
path: root/firmware/drivers/button.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/button.c')
-rw-r--r--firmware/drivers/button.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index b4ab7203a3..b0f8aa1e4d 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -131,7 +131,14 @@ static void button_tick(void)
131 !charger_inserted() && 131 !charger_inserted() &&
132#endif 132#endif
133 repeat_count > POWEROFF_COUNT) 133 repeat_count > POWEROFF_COUNT)
134 {
134 queue_post(&button_queue, SYS_POWEROFF, NULL); 135 queue_post(&button_queue, SYS_POWEROFF, NULL);
136
137 /* Safety net for players without hardware
138 poweroff */
139 if(repeat_count > POWEROFF_COUNT * 10)
140 power_off();
141 }
135#endif 142#endif
136 } 143 }
137 } 144 }