author | sandman <sandman> | 2002-10-19 01:12:25 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-10-19 01:12:25 (UTC) |
commit | a0ea0e7ff2fad769a92136edc1a7381692e7739f (patch) (side-by-side diff) | |
tree | 8c186385c133ca4ad06de66b93a91131a52cc06e /libopie/odevice.cpp | |
parent | e869be9990c0db11288bd196778cadd0ad6976a9 (diff) | |
download | opie-a0ea0e7ff2fad769a92136edc1a7381692e7739f.zip opie-a0ea0e7ff2fad769a92136edc1a7381692e7739f.tar.gz opie-a0ea0e7ff2fad769a92136edc1a7381692e7739f.tar.bz2 |
don't probe for old device names on iPAQs anymore
-rw-r--r-- | libopie/odevice.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 80e9a91..58bd663 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp @@ -559,51 +559,49 @@ bool iPAQ::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, b return true; } else return false; } void iPAQ::timerEvent ( QTimerEvent * ) { killTimer ( m_power_timer ); m_power_timer = 0; QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false ); QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); } void iPAQ::alarmSound ( ) { #if defined( QT_QWS_IPAQ ) // IPAQ #ifndef QT_NO_SOUND static Sound snd ( "alarm" ); int fd; int vol; bool vol_reset = false; - if ((( fd = ::open ( "/dev/sound/mixer", O_RDWR )) >= 0 ) || - (( fd = ::open ( "/dev/mixer", O_RDWR )) >= 0 )) { - + if (( fd = ::open ( "/dev/sound/mixer", O_RDWR )) >= 0 ) { if ( ::ioctl ( fd, MIXER_READ( 0 ), &vol ) >= 0 ) { Config cfg ( "qpe" ); cfg. setGroup ( "Volume" ); int volalarm = cfg. readNumEntry ( "AlarmPercent", 50 ); if ( volalarm < 0 ) volalarm = 0; else if ( volalarm > 100 ) volalarm = 100; volalarm |= ( volalarm << 8 ); if (( volalarm & 0xff ) > ( vol & 0xff )) { if ( ::ioctl ( fd, MIXER_WRITE( 0 ), &volalarm ) >= 0 ) vol_reset = true; } } } snd. play ( ); while ( !snd. isFinished ( )) qApp-> processEvents ( ); if ( fd >= 0 ) { if ( vol_reset ) @@ -630,50 +628,49 @@ bool iPAQ::setSoftSuspend ( bool soft ) } else ::perror ( "/proc/sys/ts/suspend_button_mode" ); return res; } bool iPAQ::setDisplayBrightness ( int bright ) { bool res = false; int fd; if ( bright > 255 ) bright = 255; if ( bright < 0 ) bright = 0; // 128 is the maximum if you want a decent lifetime for the LCD if ( bright > 1 ) bright = (int) ( 0.5 + ( ::pow ( 2, double( bright ) / 255.0 ) - 1 ) * 128.0 ); // logarithmic // bright = ( bright + 1 ) / 2; - if ((( fd = ::open ( "/dev/ts", O_WRONLY )) >= 0 ) || - (( fd = ::open ( "/dev/h3600_ts", O_WRONLY )) >= 0 )) { + if (( fd = ::open ( "/dev/touchscreen/0", O_WRONLY )) >= 0 ) { FLITE_IN bl; bl. mode = 1; bl. pwr = bright ? 1 : 0; bl. brightness = bright; res = ( ::ioctl ( fd, FLITE_ON, &bl ) == 0 ); ::close ( fd ); } return res; } int iPAQ::displayBrightnessResolution ( ) const { return 255; // really 128, but logarithmic control is smoother this way } /************************************************** * * Zaurus * **************************************************/ |