summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_simpad.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiecore/device/odevice_simpad.cpp b/libopie2/opiecore/device/odevice_simpad.cpp
index 2e54216..d6c2c80 100644
--- a/libopie2/opiecore/device/odevice_simpad.cpp
+++ b/libopie2/opiecore/device/odevice_simpad.cpp
@@ -217,33 +217,33 @@ void SIMpad::initButtons()
217static bool setCS3Bit( bool bitset, int bit ) { 217static bool setCS3Bit( bool bitset, int bit ) {
218 QFile file( SIMPAD_BOARDCONTROL ); 218 QFile file( SIMPAD_BOARDCONTROL );
219 if ( !file.open( IO_ReadOnly ) ) 219 if ( !file.open( IO_ReadOnly ) )
220 return false; 220 return false;
221 221
222 unsigned int val = 0; 222 unsigned int val = 0;
223 bool ok = false; 223 bool ok = false;
224 QTextStream stream( &file ); 224 QTextStream stream( &file );
225 225
226 /* 226 /*
227 * Use QFile and QTextStream for parsing to be more 227 * Use QFile and QTextStream for parsing to be more
228 * robust 228 * robust
229 */ 229 */
230 while ( !stream.atEnd() ) { 230 while ( !stream.atEnd() ) {
231 QString line = stream.readLine(); 231 QString line = stream.readLine();
232 if ( line.startsWith( "Chipselect3 : " ) ) { 232 if ( line.startsWith( "Chipselect3 : " ) ) {
233 val = line.mid( 15 ).toUInt( 0, 16 ); 233 val = line.mid( 14 ).toUInt( 0, 16 );
234 ok = true; 234 ok = true;
235 break; 235 break;
236 } 236 }
237 } 237 }
238 238
239 if ( !ok ) 239 if ( !ok )
240 return false; 240 return false;
241 241
242 file.close(); 242 file.close();
243 243
244 /* 244 /*
245 * change the value 245 * change the value
246 */ 246 */
247 val = bitset ? (val | bit) : (val & ~bit); 247 val = bitset ? (val | bit) : (val & ~bit);
248 248
249 /* 249 /*