summaryrefslogtreecommitdiff
path: root/libopie2
authormickeyl <mickeyl>2005-02-06 21:22:57 (UTC)
committer mickeyl <mickeyl>2005-02-06 21:22:57 (UTC)
commitf1a89d7deff682ea52f34a7d160eaa69886aa340 (patch) (side-by-side diff)
tree1386de093a1dd0f8f7ae9f9f415fd4ba9efe4bcc /libopie2
parent03c2e693a5aa0f73f88ce37bbfa1f51b7cdc7043 (diff)
downloadopie-f1a89d7deff682ea52f34a7d160eaa69886aa340.zip
opie-f1a89d7deff682ea52f34a7d160eaa69886aa340.tar.gz
opie-f1a89d7deff682ea52f34a7d160eaa69886aa340.tar.bz2
fix default orientation on 2.6 (this time taking hinge sensor into account)
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp17
1 files changed, 15 insertions, 2 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
@@ -517,14 +517,27 @@ 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: