From d4b1226ed820ec06ba07361f31dbb35ce559a4cc Mon Sep 17 00:00:00 2001 From: mickeyl Date: Sat, 01 Jan 2005 19:59:53 +0000 Subject: slightly more correct way to calculate the brightness --- diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index e75e777..fb23e1d 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp @@ -418,7 +418,7 @@ bool Zaurus::setDisplayBrightness( int bright ) int fd = ::open( SHARP_FL_IOCTL_DEVICE, O_WRONLY|O_NONBLOCK ); if ( fd ) { - int val = ( numberOfSteps * 255 ) / 255; + int val = ( bright * numberOfSteps ) / 255; res = ( ::ioctl ( fd, SHARP_FL_IOCTL_STEP_CONTRAST, val ) == 0 ); ::close ( fd ); } -- cgit v0.9.0.2