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 | |||
@@ -115,15 +115,10 @@ struct i_button ipaq_buttons [] = { | |||
115 | }; | 115 | }; |
116 | 116 | ||
117 | void iPAQ::init() | 117 | void iPAQ::init(const QString& model) |
118 | { | 118 | { |
119 | d->m_vendorstr = "HP"; | 119 | d->m_vendorstr = "HP"; |
120 | d->m_vendor = Vendor_HP; | 120 | d->m_vendor = Vendor_HP; |
121 | 121 | ||
122 | QFile f ( "/proc/hal/model" ); | 122 | d->m_modelstr = model.mid(model.findRev('H')); |
123 | |||
124 | if ( f. open ( IO_ReadOnly )) { | ||
125 | QTextStream ts ( &f ); | ||
126 | |||
127 | d->m_modelstr = "H" + ts. readLine(); | ||
128 | 123 | ||
129 | if ( d->m_modelstr == "H3100" ) | 124 | if ( d->m_modelstr == "H3100" ) |
@@ -139,9 +134,10 @@ void iPAQ::init() | |||
139 | else if ( d->m_modelstr == "H5400" ) | 134 | else if ( d->m_modelstr == "H5400" ) |
140 | d->m_model = Model_iPAQ_H5xxx; | 135 | d->m_model = Model_iPAQ_H5xxx; |
136 | else if ( d->m_modelstr == "H2200" ) | ||
137 | d->m_model = Model_iPAQ_H22xx; | ||
141 | else | 138 | else |
142 | d->m_model = Model_Unknown; | 139 | d->m_model = Model_Unknown; |
143 | 140 | ||
144 | f. close(); | 141 | |
145 | } | ||
146 | 142 | ||
147 | switch ( d->m_model ) { | 143 | switch ( d->m_model ) { |
@@ -150,16 +146,18 @@ void iPAQ::init() | |||
150 | d->m_rotation = Rot90; | 146 | d->m_rotation = Rot90; |
151 | break; | 147 | break; |
148 | case Model_iPAQ_H5xxx: | ||
149 | case Model_iPAQ_H22xx: | ||
150 | d->m_rotation = Rot0; | ||
151 | break; | ||
152 | case Model_iPAQ_H36xx: | 152 | case Model_iPAQ_H36xx: |
153 | case Model_iPAQ_H37xx: | 153 | case Model_iPAQ_H37xx: |
154 | case Model_iPAQ_H39xx: | 154 | case Model_iPAQ_H39xx: |
155 | |||
156 | default: | 155 | default: |
157 | d->m_rotation = Rot270; | 156 | d->m_rotation = Rot270; |
158 | break; | 157 | break; |
159 | case Model_iPAQ_H5xxx: | 158 | |
160 | d->m_rotation = Rot0; | ||
161 | } | 159 | } |
162 | 160 | ||
163 | f. setName ( "/etc/familiar-version" ); | 161 | QFile f( "/etc/familiar-version" ); |
164 | if ( f. open ( IO_ReadOnly )) { | 162 | if ( f. open ( IO_ReadOnly )) { |
165 | d->m_systemstr = "Familiar"; | 163 | d->m_systemstr = "Familiar"; |