From 70d2cbd97a6b39b1738e3e6580f916dcf0fbc787 Mon Sep 17 00:00:00 2001 From: sandman Date: Tue, 01 Oct 2002 16:14:39 +0000 Subject: Small bug fix for iPAQ only: screensaver "dim" didn't work anymore - the backlight was already powered off at level 0 --- (limited to 'libopie/odevice.cpp') diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index c84312e..75426f9 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp @@ -647,7 +647,8 @@ bool iPAQ::setDisplayBrightness ( int bright ) // 128 is the maximum if you want a decent lifetime for the LCD - bright = (int) (( ::pow ( 2, double( bright ) / 255.0 ) - 1 ) * 128.0 ); // logarithmic + 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 ) || -- cgit v0.9.0.2