author | mickeyl <mickeyl> | 2005-08-17 17:28:11 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-08-17 17:28:11 (UTC) |
commit | 7f931999d32be3fc90b451347dfec52643d8eeb8 (patch) (side-by-side diff) | |
tree | a0047526c4b4e8da2e35f28dfdc3890c24c207a0 /libopie2 | |
parent | e68f54c2f00d8e7a8e753722a50b47484c1124ee (diff) | |
download | opie-7f931999d32be3fc90b451347dfec52643d8eeb8.zip opie-7f931999d32be3fc90b451347dfec52643d8eeb8.tar.gz opie-7f931999d32be3fc90b451347dfec52643d8eeb8.tar.bz2 |
split rotation handling of c7x0 and CXK because of the W100 Rot0 special case
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
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 @@ -552,3 +552,14 @@ Transformation Zaurus::rotation() const 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: @@ -561,3 +572,3 @@ Transformation Zaurus::rotation() const if ( hs == CASE_PORTRAIT ) rot = Rot0; - else if ( hs == CASE_UNKNOWN ) rot = Rot0; + else if ( hs == CASE_UNKNOWN ) rot = Rot270; else rot = Rot270; @@ -571,3 +582,3 @@ Transformation Zaurus::rotation() const } - break; + break; case Model_Zaurus_SL6000: |