author | schurig <schurig> | 2004-09-09 09:08:36 (UTC) |
---|---|---|
committer | schurig <schurig> | 2004-09-09 09:08:36 (UTC) |
commit | 8df28401db620a01144ca45988837583f55e15c3 (patch) (unidiff) | |
tree | 7024a45504623a81abbf58c7ab0cae08d7870bd2 | |
parent | 739d8dc8d4aed25e09d43805c802e9836240655b (diff) | |
download | opie-8df28401db620a01144ca45988837583f55e15c3.zip opie-8df28401db620a01144ca45988837583f55e15c3.tar.gz opie-8df28401db620a01144ca45988837583f55e15c3.tar.bz2 |
support for devfs
-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index 280b0c5..2355621 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp | |||
@@ -310,25 +310,29 @@ bool ODevice::suspend() | |||
310 | * This sets the display on or off | 310 | * This sets the display on or off |
311 | */ | 311 | */ |
312 | bool ODevice::setDisplayStatus ( bool on ) | 312 | bool ODevice::setDisplayStatus ( bool on ) |
313 | { | 313 | { |
314 | qDebug("ODevice::setDisplayStatus(%d)", on); | 314 | qDebug("ODevice::setDisplayStatus(%d)", on); |
315 | 315 | ||
316 | if ( d->m_model == Model_Unknown ) | 316 | if ( d->m_model == Model_Unknown ) |
317 | return false; | 317 | return false; |
318 | 318 | ||
319 | bool res = false; | 319 | bool res = false; |
320 | int fd; | 320 | int fd; |
321 | 321 | ||
322 | #ifdef QT_QWS_DEVFS | ||
323 | if (( fd = ::open ( "/dev/fb/0", O_RDWR )) >= 0 ) { | ||
324 | #else | ||
322 | if (( fd = ::open ( "/dev/fb0", O_RDWR )) >= 0 ) { | 325 | if (( fd = ::open ( "/dev/fb0", O_RDWR )) >= 0 ) { |
326 | #endif | ||
323 | res = ( ::ioctl ( fd, FBIOBLANK, on ? VESA_NO_BLANKING : VESA_POWERDOWN ) == 0 ); | 327 | res = ( ::ioctl ( fd, FBIOBLANK, on ? VESA_NO_BLANKING : VESA_POWERDOWN ) == 0 ); |
324 | ::close ( fd ); | 328 | ::close ( fd ); |
325 | } | 329 | } |
326 | return res; | 330 | return res; |
327 | } | 331 | } |
328 | 332 | ||
329 | /** | 333 | /** |
330 | * This sets the display brightness | 334 | * This sets the display brightness |
331 | * | 335 | * |
332 | * @param p The brightness to be set on a scale from 0 to 255 | 336 | * @param p The brightness to be set on a scale from 0 to 255 |
333 | * @return success or failure | 337 | * @return success or failure |
334 | */ | 338 | */ |