summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_ipaq.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiecore/device/odevice_ipaq.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_ipaq.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp
index 6dc1295..b18fd32 100644
--- a/libopie2/opiecore/device/odevice_ipaq.cpp
+++ b/libopie2/opiecore/device/odevice_ipaq.cpp
@@ -428,51 +428,50 @@ int iPAQ::displayBrightnessResolution() const
if ( sysClass.exists() && sysClass.count() > 2 ) {
QString sysClassPath = sysClass.absFilePath( sysClass[2] + "/max_brightness" );
int fd = ::open( sysClassPath, O_RDONLY|O_NONBLOCK );
if ( fd ) {
char buf[100];
if ( ::read( fd, &buf[0], sizeof buf ) )
::sscanf( &buf[0], "%d", &res );
::close( fd );
}
return res;
}
switch ( model()) {
case Model_iPAQ_H31xx:
case Model_iPAQ_H36xx:
case Model_iPAQ_H37xx:
return 128; // really 256, but >128 could damage the LCD
case Model_iPAQ_H38xx:
case Model_iPAQ_H39xx:
return 64;
case Model_iPAQ_H5xxx:
case Model_iPAQ_HX4700:
case Model_iPAQ_H4xxx:
- return 255;
case Model_iPAQ_H191x:
- return 7;
+ return 255;
case Model_iPAQ_H1940:
return 44;
default:
return 2;
}
}
bool iPAQ::setDisplayStatus ( bool on )
{
bool res = false;
QString cmdline;
QDir sysClass( "/sys/class/lcd/" );
sysClass.setFilter(QDir::Dirs);
if ( sysClass.exists() && sysClass.count() > 2 ) {
QString sysClassPath = sysClass.absFilePath( sysClass[2] + "/power" );
int fd = ::open( sysClassPath, O_WRONLY|O_NONBLOCK );
if ( fd ) {
char buf[10];
buf[0] = on ? 0 : 4;
buf[1] = '\0';
res = ( ::write( fd, &buf[0], 2 ) == 0 );
::close( fd );