aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2014-11-11 15:37:48 +0100
committerLars-Dominik Braun <lars@6xq.net>2014-11-11 15:37:48 +0100
commite28544863a991dc6c9d7bd25351096c905759c97 (patch)
treefb5a64894538f263f54304d2176da060c88a87dc
parenta7f63373bacfd36d438f11c38d5e54f48ec4f012 (diff)
downloadhourglass-e28544863a991dc6c9d7bd25351096c905759c97.tar.gz
hourglass-e28544863a991dc6c9d7bd25351096c905759c97.tar.bz2
hourglass-e28544863a991dc6c9d7bd25351096c905759c97.zip
ui: Simplify accel
-rw-r--r--ui.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ui.c b/ui.c
index 6d32031..408724f 100644
--- a/ui.c
+++ b/ui.c
@@ -257,8 +257,7 @@ static void doAlarm () {
*/
static void doInit () {
/* get initial orientation */
- h = accelGetHorizon ();
- if (h != HORIZON_NONE) {
+ if (horizonChanged && h != HORIZON_NONE) {
puts ("init->idle");
enterIdle ();