summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 8f4e296..7d8cdbf 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -659,6 +659,4 @@ bool iPAQ::setDisplayBrightness ( int bright )
659 659
660 int maxbright = displayBrightnessResolution ( ); 660 if ( bright > 255 )
661 661 bright = 255;
662 if ( bright > maxbright )
663 bright = maxbright;
664 if ( bright < 0 ) 662 if ( bright < 0 )
@@ -670,3 +668,3 @@ bool iPAQ::setDisplayBrightness ( int bright )
670 bl. pwr = bright ? 1 : 0; 668 bl. pwr = bright ? 1 : 0;
671 bl. brightness = bright; 669 bl. brightness = ( bright * ( displayBrightnessResolution ( ) - 1 ) + 127 ) / 255;
672 res = ( ::ioctl ( fd, FLITE_ON, &bl ) == 0 ); 670 res = ( ::ioctl ( fd, FLITE_ON, &bl ) == 0 );