-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
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 @@ -507,34 +507,47 @@ bool Zaurus::suspend() ::usleep ( 200 * 1000 ); ::gettimeofday ( &tvn, 0 ); } while ((( tvn. tv_sec - tvs. tv_sec ) * 1000 + ( tvn. tv_usec - tvs. tv_usec ) / 1000 ) < 15000 ); } QCopEnvelope ( "QPE/Rotation", "rotateDefault()" ); return res; } Transformation Zaurus::rotation() const { + qDebug( "Zaurus::rotation()" ); Transformation rot; switch ( d->m_model ) { case Model_Zaurus_SLC3000: // fallthrough - case Model_Zaurus_SLC7x0: { + 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: case Model_Zaurus_SLA300: case Model_Zaurus_SL5500: case Model_Zaurus_SL5000: default: rot = d->m_rotation; break; } return rot; |