From 7f931999d32be3fc90b451347dfec52643d8eeb8 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Wed, 17 Aug 2005 17:28:11 +0000 Subject: split rotation handling of c7x0 and CXK because of the W100 Rot0 special case --- (limited to 'libopie2') diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index 7302d2c..b7f3104 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp @@ -550,7 +550,18 @@ Transformation Zaurus::rotation() const switch ( d->m_model ) { case Model_Zaurus_SLC3000: // fallthrough - case Model_Zaurus_SLC1000: // fallthrough + case Model_Zaurus_SLC1000: + { + OHingeStatus hs = readHingeSensor(); + qDebug( "Zaurus::rotation() - hinge sensor = %d", (int) hs ); + if ( hs == CASE_PORTRAIT ) rot = Rot0; + else if ( hs == CASE_UNKNOWN ) rot = Rot270; + else rot = Rot270; + } + break; + + // SLC7x0 needs a special case here, because we were able to set the W100 + // hardware default rotation on kernel 2.6 to Rot0 case Model_Zaurus_SLC7x0: { OHingeStatus hs = readHingeSensor(); @@ -559,7 +570,7 @@ Transformation Zaurus::rotation() const if ( m_embedix ) { if ( hs == CASE_PORTRAIT ) rot = Rot0; - else if ( hs == CASE_UNKNOWN ) rot = Rot0; + else if ( hs == CASE_UNKNOWN ) rot = Rot270; else rot = Rot270; } else @@ -569,7 +580,7 @@ Transformation Zaurus::rotation() const else rot = Rot0; } } - break; + break; case Model_Zaurus_SL6000: case Model_Zaurus_SLB600: case Model_Zaurus_SLA300: -- cgit v0.9.0.2