diff options
Diffstat (limited to 'tools/qml/deviceorientation_maemo.cpp')
-rw-r--r-- | tools/qml/deviceorientation_maemo.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/qml/deviceorientation_maemo.cpp b/tools/qml/deviceorientation_maemo.cpp index 9f12f3d..501ff79 100644 --- a/tools/qml/deviceorientation_maemo.cpp +++ b/tools/qml/deviceorientation_maemo.cpp @@ -48,11 +48,11 @@ class MaemoOrientation : public DeviceOrientation Q_OBJECT public: MaemoOrientation() - : DeviceOrientation(),m_current(Portrait), m_lastSeen(Portrait), m_lastSeenCount(0) + : DeviceOrientation(),m_current(TopUp), m_lastSeen(TopUp), m_lastSeenCount(0) { m_current = get(); if (m_current == UnknownOrientation) - m_current = Portrait; + m_current = TopUp; startTimer(100); } @@ -101,9 +101,13 @@ private: if (abs(az) > 850) { o = UnknownOrientation; } else if (ax < -750) { - o = Portrait; + o = LeftUp; + } else if (ax > 750) { + o = RightUp; } else if (ay < -750) { - o = Landscape; + o = TopUp; + } else if (ay > 750) { + o = TopDown; } return o; |