summaryrefslogtreecommitdiff
path: root/libopie
authorschurig <schurig>2004-09-10 12:18:17 (UTC)
committer schurig <schurig>2004-09-10 12:18:17 (UTC)
commit9d0ccc1c5ca687bc017b2b515a9d3a47e98ce521 (patch) (unidiff)
tree53927c6a19c69d54bb3d0e092ac57180bcb60222 /libopie
parented70ec4945c7816ec6e899207ec8b99e20e10da5 (diff)
downloadopie-9d0ccc1c5ca687bc017b2b515a9d3a47e98ce521.zip
opie-9d0ccc1c5ca687bc017b2b515a9d3a47e98ce521.tar.gz
opie-9d0ccc1c5ca687bc017b2b515a9d3a47e98ce521.tar.bz2
added support for DEVFS
Diffstat (limited to 'libopie') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 21070bf..9d0bbbf 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -592,13 +592,17 @@ bool ODevice::setDisplayStatus ( bool on )
592 if ( d-> m_model == Model_Unknown ) 592 if ( d-> m_model == Model_Unknown )
593 return false; 593 return false;
594 594
595 bool res = false; 595 bool res = false;
596 int fd; 596 int fd;
597 597
598#ifdef QT_QWS_DEVFS
599 if (( fd = ::open ( "/dev/fb/0", O_RDWR )) >= 0 ) {
600#else
598 if (( fd = ::open ( "/dev/fb0", O_RDWR )) >= 0 ) { 601 if (( fd = ::open ( "/dev/fb0", O_RDWR )) >= 0 ) {
602#endif
599 res = ( ::ioctl ( fd, FBIOBLANK, on ? VESA_NO_BLANKING : VESA_POWERDOWN ) == 0 ); 603 res = ( ::ioctl ( fd, FBIOBLANK, on ? VESA_NO_BLANKING : VESA_POWERDOWN ) == 0 );
600 ::close ( fd ); 604 ::close ( fd );
601 } 605 }
602 return res; 606 return res;
603} 607}
604 608