author | sandman <sandman> | 2002-10-01 16:14:39 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-10-01 16:14:39 (UTC) |
commit | 70d2cbd97a6b39b1738e3e6580f916dcf0fbc787 (patch) (unidiff) | |
tree | ff6ab6c52a7dc886a61de659dd2860a587b953a0 /libopie/odevice.cpp | |
parent | 657eeb18141838eeb0d18351a6755d7fa686f9d9 (diff) | |
download | opie-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
-rw-r--r-- | libopie/odevice.cpp | 3 |
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 | |||
@@ -646,9 +646,10 @@ bool iPAQ::setDisplayBrightness ( int bright ) | |||
646 | bright = 0; | 646 | bright = 0; |
647 | 647 | ||
648 | // 128 is the maximum if you want a decent lifetime for the LCD | 648 | // 128 is the maximum if you want a decent lifetime for the LCD |
649 | 649 | ||
650 | bright = (int) (( ::pow ( 2, double( bright ) / 255.0 ) - 1 ) * 128.0 ); // logarithmic | 650 | if ( bright > 1 ) |
651 | bright = (int) ( 0.5 + ( ::pow ( 2, double( bright ) / 255.0 ) - 1 ) * 128.0 ); // logarithmic | ||
651 | //bright = ( bright + 1 ) / 2; | 652 | //bright = ( bright + 1 ) / 2; |
652 | 653 | ||
653 | if ((( fd = ::open ( "/dev/ts", O_WRONLY )) >= 0 ) || | 654 | if ((( fd = ::open ( "/dev/ts", O_WRONLY )) >= 0 ) || |
654 | (( fd = ::open ( "/dev/h3600_ts", O_WRONLY )) >= 0 )) { | 655 | (( fd = ::open ( "/dev/h3600_ts", O_WRONLY )) >= 0 )) { |