summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp64
1 files changed, 33 insertions, 31 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp
index cbc7a24..2128d46 100644
--- a/libopie2/opiecore/device/odevice_zaurus.cpp
+++ b/libopie2/opiecore/device/odevice_zaurus.cpp
@@ -1,32 +1,32 @@
1/* 1/*
2                 This file is part of the Opie Project 2 This file is part of the Opie Project
3              Copyright (C) The Opie Team <opie-devel@handhelds.org> 3 Copyright (C) The Opie Team <opie-devel@handhelds.org>
4 =. Copyright (C) 2003-2005 Michael 'Mickey' Lauer <mickey@Vanille.de> 4 =. Copyright (C) 2003-2005 Michael 'Mickey' Lauer <mickey@Vanille.de>
5 .=l. 5 .=l.
6           .>+-= 6 .>+-=
7 _;:,     .>    :=|. This program is free software; you can 7_;:, .> :=|. This program is free software; you can
8.> <`_,   >  .   <= redistribute it and/or modify it under 8.> <`_, > . <= redistribute it and/or modify it under
9:`=1 )Y*s>-.--   : the terms of the GNU Library General Public 9:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
10.="- .-=="i,     .._ License as published by the Free Software 10.="- .-=="i, .._ License as published by the Free Software
11 - .   .-<_>     .<> Foundation; either version 2 of the License, 11- . .-<_> .<> Foundation; either version 2 of the License,
12     ._= =}       : or (at your option) any later version. 12 ._= =} : or (at your option) any later version.
13    .%`+i>       _;_. 13 .%`+i> _;_.
14    .i_,=:_.      -<s. This program is distributed in the hope that 14 .i_,=:_. -<s. This program is distributed in the hope that
15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 15 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
16    : ..    .:,     . . . without even the implied warranty of 16 : .. .:, . . . without even the implied warranty of
17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 17 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 18 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
19..}^=.=       =       ; Library General Public License for more 19..}^=.= = ; Library General Public License for more
20++=   -.     .`     .: details. 20++= -. .` .: details.
21 :     =  ...= . :.=- 21: = ...= . :.=-
22 -.   .:....=;==+<; You should have received a copy of the GNU 22-. .:....=;==+<; You should have received a copy of the GNU
23  -_. . .   )=.  = Library General Public License along with 23 -_. . . )=. = Library General Public License along with
24    --        :-=` this library; see the file COPYING.LIB. 24 -- :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation, 25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330, 26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA. 27 Boston, MA 02111-1307, USA.
28*/ 28*/
29 29
30#include "odevice_zaurus.h" 30#include "odevice_zaurus.h"
31 31
32/* QT */ 32/* QT */
@@ -501,21 +501,22 @@ bool Zaurus::suspend()
501 501
502 502
503Transformation Zaurus::rotation() const 503Transformation Zaurus::rotation() const
504{ 504{
505 Transformation rot; 505 Transformation rot;
506 506
507 switch ( d->m_model ) { 507 switch ( d->m_model ) {
508 case Model_Zaurus_SLC3000: // fallthrough 508 case Model_Zaurus_SLC3000: // fallthrough
509 case Model_Zaurus_SLC7x0: 509 case Model_Zaurus_SLC7x0: {
510 OHingeStatus hs = readHingeSensor(); 510 OHingeStatus hs = readHingeSensor();
511 if ( hs == CASE_PORTRAIT ) rot = Rot0; 511 if ( hs == CASE_PORTRAIT ) rot = Rot0;
512 else if ( hs == CASE_UNKNOWN ) rot = Rot0; 512 else if ( hs == CASE_UNKNOWN ) rot = Rot0;
513 else rot = Rot270; 513 else rot = Rot270;
514 }
514 break; 515 break;
515 case Model_Zaurus_SL6000: 516 case Model_Zaurus_SL6000:
516 case Model_Zaurus_SLB600: 517 case Model_Zaurus_SLB600:
517 case Model_Zaurus_SLA300: 518 case Model_Zaurus_SLA300:
518 case Model_Zaurus_SL5500: 519 case Model_Zaurus_SL5500:
519 case Model_Zaurus_SL5000: 520 case Model_Zaurus_SL5000:
520 default: 521 default:
521 rot = d->m_rotation; 522 rot = d->m_rotation;
@@ -525,21 +526,22 @@ Transformation Zaurus::rotation() const
525 return rot; 526 return rot;
526} 527}
527ODirection Zaurus::direction() const 528ODirection Zaurus::direction() const
528{ 529{
529 ODirection dir; 530 ODirection dir;
530 531
531 switch ( d->m_model ) { 532 switch ( d->m_model ) {
532 case Model_Zaurus_SLC3000: // fallthrough 533 case Model_Zaurus_SLC3000: // fallthrough
533 case Model_Zaurus_SLC7x0: 534 case Model_Zaurus_SLC7x0: {
534 OHingeStatus hs = readHingeSensor(); 535 OHingeStatus hs = readHingeSensor();
535 if ( hs == CASE_PORTRAIT ) dir = CCW; 536 if ( hs == CASE_PORTRAIT ) dir = CCW;
536 else if ( hs == CASE_UNKNOWN ) dir = CCW; 537 else if ( hs == CASE_UNKNOWN ) dir = CCW;
537 else dir = CW; 538 else dir = CW;
539 }
538 break; 540 break;
539 case Model_Zaurus_SL6000: 541 case Model_Zaurus_SL6000:
540 case Model_Zaurus_SLA300: 542 case Model_Zaurus_SLA300:
541 case Model_Zaurus_SLB600: 543 case Model_Zaurus_SLB600:
542 case Model_Zaurus_SL5500: 544 case Model_Zaurus_SL5500:
543 case Model_Zaurus_SL5000: 545 case Model_Zaurus_SL5000:
544 default: dir = d->m_direction; 546 default: dir = d->m_direction;
545 break; 547 break;