summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_zaurus.cpp
Unidiff
Diffstat (limited to 'libopie2/opiecore/device/odevice_zaurus.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp
index b7f3104..4a80a7e 100644
--- a/libopie2/opiecore/device/odevice_zaurus.cpp
+++ b/libopie2/opiecore/device/odevice_zaurus.cpp
@@ -1,7 +1,7 @@
1/* 1/*
2                 This file is part of the Opie Project 2                 This file is part of the Opie Project
3              Copyright (C) 2002-2005 The Opie Team <opie-devel@handhelds.org> 3              Copyright (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
4 =. 4 =. Copyright (C) 2002-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
@@ -224,6 +224,9 @@ void Zaurus::init(const QString& cpu_info)
224 } else if ( model == "SHARP Akita" ) { 224 } else if ( model == "SHARP Akita" ) {
225 d->m_model = Model_Zaurus_SLC1000; 225 d->m_model = Model_Zaurus_SLC1000;
226 d->m_modelstr = "Zaurus SL-C1000"; 226 d->m_modelstr = "Zaurus SL-C1000";
227 } else if ( model == "SHARP Borzoi" ) {
228 d->m_model = Model_Zaurus_SLC3100;
229 d->m_modelstr = "Zaurus SL-C3100";
227 } else { 230 } else {
228 d->m_model = Model_Zaurus_SL5500; 231 d->m_model = Model_Zaurus_SL5500;
229 d->m_modelstr = "Unknown Zaurus"; 232 d->m_modelstr = "Unknown Zaurus";
@@ -250,6 +253,7 @@ void Zaurus::init(const QString& cpu_info)
250 case Model_Zaurus_SLA300: 253 case Model_Zaurus_SLA300:
251 d->m_rotation = Rot0; 254 d->m_rotation = Rot0;
252 break; 255 break;
256 case Model_Zaurus_SLC3100: // fallthrough
253 case Model_Zaurus_SLC3000: // fallthrough 257 case Model_Zaurus_SLC3000: // fallthrough
254 case Model_Zaurus_SLC1000: // fallthrough 258 case Model_Zaurus_SLC1000: // fallthrough
255 case Model_Zaurus_SLC7x0: 259 case Model_Zaurus_SLC7x0:
@@ -296,6 +300,7 @@ void Zaurus::initButtons()
296 pz_buttons = z_buttons_6000; 300 pz_buttons = z_buttons_6000;
297 buttoncount = ARRAY_SIZE(z_buttons_6000); 301 buttoncount = ARRAY_SIZE(z_buttons_6000);
298 break; 302 break;
303 case Model_Zaurus_SLC3100: // fallthrough
299 case Model_Zaurus_SLC3000: // fallthrough 304 case Model_Zaurus_SLC3000: // fallthrough
300 case Model_Zaurus_SLC1000: // fallthrough 305 case Model_Zaurus_SLC1000: // fallthrough
301 case Model_Zaurus_SLC7x0: 306 case Model_Zaurus_SLC7x0:
@@ -549,6 +554,7 @@ Transformation Zaurus::rotation() const
549 Transformation rot; 554 Transformation rot;
550 555
551 switch ( d->m_model ) { 556 switch ( d->m_model ) {
557 case Model_Zaurus_SLC3100: // fallthrough
552 case Model_Zaurus_SLC3000: // fallthrough 558 case Model_Zaurus_SLC3000: // fallthrough
553 case Model_Zaurus_SLC1000: 559 case Model_Zaurus_SLC1000:
554 { 560 {
@@ -598,6 +604,7 @@ ODirection Zaurus::direction() const
598 ODirection dir; 604 ODirection dir;
599 605
600 switch ( d->m_model ) { 606 switch ( d->m_model ) {
607 case Model_Zaurus_SLC3100: // fallthrough
601 case Model_Zaurus_SLC3000: // fallthrough 608 case Model_Zaurus_SLC3000: // fallthrough
602 case Model_Zaurus_SLC1000: // fallthrough 609 case Model_Zaurus_SLC1000: // fallthrough
603 case Model_Zaurus_SLC7x0: { 610 case Model_Zaurus_SLC7x0: {
@@ -621,7 +628,10 @@ ODirection Zaurus::direction() const
621 628
622bool Zaurus::hasHingeSensor() const 629bool Zaurus::hasHingeSensor() const
623{ 630{
624 return d->m_model == Model_Zaurus_SLC7x0 || d->m_model == Model_Zaurus_SLC3000 || d->m_model == Model_Zaurus_SLC1000; 631 return d->m_model == Model_Zaurus_SLC7x0 ||
632 d->m_model == Model_Zaurus_SLC3100 ||
633 d->m_model == Model_Zaurus_SLC3000 ||
634 d->m_model == Model_Zaurus_SLC1000;
625} 635}
626 636
627OHingeStatus Zaurus::readHingeSensor() const 637OHingeStatus Zaurus::readHingeSensor() const
@@ -671,7 +681,7 @@ bool Zaurus::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress,
671{ 681{
672 int newkeycode = keycode; 682 int newkeycode = keycode;
673 683
674 if (d->m_model != Model_Zaurus_SLC7x0 && d->m_model != Model_Zaurus_SLC3000 && d->m_model != Model_Zaurus_SLC1000) return false; 684 if ( !hasHingeSensor() ) return false;
675 685
676 /* map cursor keys depending on the hinge status */ 686 /* map cursor keys depending on the hinge status */
677 switch ( keycode ) { 687 switch ( keycode ) {