summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_ipaq.cpp
Unidiff
Diffstat (limited to 'libopie2/opiecore/device/odevice_ipaq.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_ipaq.cpp21
1 files changed, 0 insertions, 21 deletions
diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp
index 9e01a0c..2ce38a9 100644
--- a/libopie2/opiecore/device/odevice_ipaq.cpp
+++ b/libopie2/opiecore/device/odevice_ipaq.cpp
@@ -327,45 +327,24 @@ void iPAQ::timerEvent ( QTimerEvent * )
327void iPAQ::playAlarmSound() 327void iPAQ::playAlarmSound()
328{ 328{
329#ifndef QT_NO_SOUND 329#ifndef QT_NO_SOUND
330 static Sound snd ( "alarm" ); 330 static Sound snd ( "alarm" );
331 if(!snd.isFinished()) 331 if(!snd.isFinished())
332 return; 332 return;
333 333
334 changeMixerForAlarm(0, "/dev/sound/mixer", &snd ); 334 changeMixerForAlarm(0, "/dev/sound/mixer", &snd );
335 snd. play(); 335 snd. play();
336#endif 336#endif
337} 337}
338 338
339
340bool iPAQ::setSoftSuspend ( bool soft )
341{
342 bool res = false;
343 int fd;
344
345 if (( fd = ::open ( "/proc/sys/ts/suspend_button_mode", O_WRONLY )) >= 0 ) {
346 if ( ::write ( fd, soft ? "1" : "0", 1 ) == 1 )
347 res = true;
348 else
349 ::perror ( "write to /proc/sys/ts/suspend_button_mode" );
350
351 ::close ( fd );
352 }
353 else
354 ::perror ( "/proc/sys/ts/suspend_button_mode" );
355
356 return res;
357}
358
359
360bool iPAQ::setDisplayBrightness ( int bright ) 339bool iPAQ::setDisplayBrightness ( int bright )
361{ 340{
362 bool res = false; 341 bool res = false;
363 int fd; 342 int fd;
364 343
365 if ( bright > 255 ) 344 if ( bright > 255 )
366 bright = 255; 345 bright = 255;
367 if ( bright < 0 ) 346 if ( bright < 0 )
368 bright = 0; 347 bright = 0;
369 348
370 if (( fd = ::open ( "/dev/touchscreen/0", O_WRONLY )) >= 0 ) { 349 if (( fd = ::open ( "/dev/touchscreen/0", O_WRONLY )) >= 0 ) {
371 FLITE_IN bl; 350 FLITE_IN bl;