summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp7
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
@@ -577,15 +577,13 @@ void iPAQ::alarmSound ( )
#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 )
@@ -648,14 +646,13 @@ bool iPAQ::setDisplayBrightness ( int bright )
// 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 );