author | chicken <chicken> | 2004-11-05 10:34:02 (UTC) |
---|---|---|
committer | chicken <chicken> | 2004-11-05 10:34:02 (UTC) |
commit | aea18d994988507f6153552698cbb67054715a92 (patch) (side-by-side diff) | |
tree | 704b7ec91f59e432910343a6d3efc73b90fae613 | |
parent | 586ba5bb2842d80911ea22bf47eaa2f1b39362e1 (diff) | |
download | opie-aea18d994988507f6153552698cbb67054715a92.zip opie-aea18d994988507f6153552698cbb67054715a92.tar.gz opie-aea18d994988507f6153552698cbb67054715a92.tar.bz2 |
correct simpad cs3 readout
-rw-r--r-- | libopie2/opiecore/device/odevice_simpad.cpp | 2 |
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() static bool setCS3Bit( bool bitset, int bit ) { QFile file( SIMPAD_BOARDCONTROL ); if ( !file.open( IO_ReadOnly ) ) return false; unsigned int val = 0; bool ok = false; QTextStream stream( &file ); /* * Use QFile and QTextStream for parsing to be more * robust */ while ( !stream.atEnd() ) { QString line = stream.readLine(); if ( line.startsWith( "Chipselect3 : " ) ) { - val = line.mid( 15 ).toUInt( 0, 16 ); + val = line.mid( 14 ).toUInt( 0, 16 ); ok = true; break; } } if ( !ok ) return false; file.close(); /* * change the value */ val = bitset ? (val | bit) : (val & ~bit); /* |