Diffstat (limited to 'libopie2/opiecore/device/odevice_ipaq.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_ipaq.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp index 98e2ffa..efe35e7 100644 --- a/libopie2/opiecore/device/odevice_ipaq.cpp +++ b/libopie2/opiecore/device/odevice_ipaq.cpp @@ -116,3 +116,3 @@ struct i_button ipaq_buttons [] = { -void iPAQ::init() +void iPAQ::init(const QString& model) { @@ -121,8 +121,3 @@ void iPAQ::init() - QFile f ( "/proc/hal/model" ); - - if ( f. open ( IO_ReadOnly )) { - QTextStream ts ( &f ); - - d->m_modelstr = "H" + ts. readLine(); + d->m_modelstr = model.mid(model.findRev('H')); @@ -140,2 +135,4 @@ void iPAQ::init() d->m_model = Model_iPAQ_H5xxx; + else if ( d->m_modelstr == "H2200" ) + d->m_model = Model_iPAQ_H22xx; else @@ -143,4 +140,3 @@ void iPAQ::init() - f. close(); - } + @@ -151,2 +147,6 @@ void iPAQ::init() break; + case Model_iPAQ_H5xxx: + case Model_iPAQ_H22xx: + d->m_rotation = Rot0; + break; case Model_iPAQ_H36xx: @@ -154,3 +154,2 @@ void iPAQ::init() case Model_iPAQ_H39xx: - default: @@ -158,7 +157,6 @@ void iPAQ::init() break; - case Model_iPAQ_H5xxx: - d->m_rotation = Rot0; + } - f. setName ( "/etc/familiar-version" ); + QFile f( "/etc/familiar-version" ); if ( f. open ( IO_ReadOnly )) { |