summaryrefslogtreecommitdiff
authorsandman <sandman>2002-10-01 16:14:39 (UTC)
committer sandman <sandman>2002-10-01 16:14:39 (UTC)
commit70d2cbd97a6b39b1738e3e6580f916dcf0fbc787 (patch) (side-by-side diff)
treeff6ab6c52a7dc886a61de659dd2860a587b953a0
parent657eeb18141838eeb0d18351a6755d7fa686f9d9 (diff)
downloadopie-70d2cbd97a6b39b1738e3e6580f916dcf0fbc787.zip
opie-70d2cbd97a6b39b1738e3e6580f916dcf0fbc787.tar.gz
opie-70d2cbd97a6b39b1738e3e6580f916dcf0fbc787.tar.bz2
Small bug fix for iPAQ only: screensaver "dim" didn't work anymore -
the backlight was already powered off at level 0
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index c84312e..75426f9 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -648,5 +648,6 @@ 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;