-rw-r--r-- | libopie/odevice.cpp | 4 |
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 @@ -590,17 +590,21 @@ bool ODevice::setDisplayStatus ( bool on ) qDebug("ODevice::setDisplayStatus(%d)", on); if ( d-> m_model == Model_Unknown ) return false; bool res = false; int fd; +#ifdef QT_QWS_DEVFS + if (( fd = ::open ( "/dev/fb/0", O_RDWR )) >= 0 ) { +#else if (( fd = ::open ( "/dev/fb0", O_RDWR )) >= 0 ) { +#endif res = ( ::ioctl ( fd, FBIOBLANK, on ? VESA_NO_BLANKING : VESA_POWERDOWN ) == 0 ); ::close ( fd ); } return res; } /** * This sets the display brightness |