From f1a89d7deff682ea52f34a7d160eaa69886aa340 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Sun, 06 Feb 2005 21:22:57 +0000 Subject: fix default orientation on 2.6 (this time taking hinge sensor into account) --- diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index a59e799..7377965 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp @@ -516,16 +516,29 @@ bool Zaurus::suspend() Transformation Zaurus::rotation() const { + qDebug( "Zaurus::rotation()" ); Transformation rot; switch ( d->m_model ) { case Model_Zaurus_SLC3000: // fallthrough - case Model_Zaurus_SLC7x0: { - OHingeStatus hs = readHingeSensor(); + case Model_Zaurus_SLC7x0: + { + OHingeStatus hs = readHingeSensor(); + qDebug( "Zaurus::rotation() - hinge sensor = %d", (int) hs ); + + if ( m_embedix ) + { if ( hs == CASE_PORTRAIT ) rot = Rot0; else if ( hs == CASE_UNKNOWN ) rot = Rot0; else rot = Rot270; } + else + { + if ( hs == CASE_PORTRAIT ) rot = Rot270; + else if ( hs == CASE_UNKNOWN ) rot = Rot0; + else rot = Rot0; + } + } break; case Model_Zaurus_SL6000: case Model_Zaurus_SLB600: -- cgit v0.9.0.2