Diffstat (limited to 'libopie2/opiecore/device/odevice_ipaq.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_ipaq.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp index d68bce1..d20ea4d 100644 --- a/libopie2/opiecore/device/odevice_ipaq.cpp +++ b/libopie2/opiecore/device/odevice_ipaq.cpp | |||
@@ -321,49 +321,49 @@ bool iPAQ::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, b | |||
321 | } | 321 | } |
322 | newkeycode = Key_unknown; | 322 | newkeycode = Key_unknown; |
323 | break; | 323 | break; |
324 | } | 324 | } |
325 | } | 325 | } |
326 | 326 | ||
327 | if ( newkeycode != keycode ) { | 327 | if ( newkeycode != keycode ) { |
328 | if ( newkeycode != Key_unknown ) | 328 | if ( newkeycode != Key_unknown ) |
329 | QWSServer::sendKeyEvent ( -1, newkeycode, modifiers, isPress, autoRepeat ); | 329 | QWSServer::sendKeyEvent ( -1, newkeycode, modifiers, isPress, autoRepeat ); |
330 | return true; | 330 | return true; |
331 | } | 331 | } |
332 | else | 332 | else |
333 | return false; | 333 | return false; |
334 | } | 334 | } |
335 | 335 | ||
336 | void iPAQ::timerEvent ( QTimerEvent * ) | 336 | void iPAQ::timerEvent ( QTimerEvent * ) |
337 | { | 337 | { |
338 | killTimer ( m_power_timer ); | 338 | killTimer ( m_power_timer ); |
339 | m_power_timer = 0; | 339 | m_power_timer = 0; |
340 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false ); | 340 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false ); |
341 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); | 341 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); |
342 | } | 342 | } |
343 | 343 | ||
344 | 344 | ||
345 | void iPAQ::alarmSound() | 345 | void iPAQ::playAlarmSound() |
346 | { | 346 | { |
347 | #ifndef QT_NO_SOUND | 347 | #ifndef QT_NO_SOUND |
348 | static Sound snd ( "alarm" ); | 348 | static Sound snd ( "alarm" ); |
349 | int fd; | 349 | int fd; |
350 | int vol; | 350 | int vol; |
351 | bool vol_reset = false; | 351 | bool vol_reset = false; |
352 | 352 | ||
353 | if (( fd = ::open ( "/dev/sound/mixer", O_RDWR )) >= 0 ) { | 353 | if (( fd = ::open ( "/dev/sound/mixer", O_RDWR )) >= 0 ) { |
354 | if ( ::ioctl ( fd, MIXER_READ( 0 ), &vol ) >= 0 ) { | 354 | if ( ::ioctl ( fd, MIXER_READ( 0 ), &vol ) >= 0 ) { |
355 | Config cfg ( "qpe" ); | 355 | Config cfg ( "qpe" ); |
356 | cfg. setGroup ( "Volume" ); | 356 | cfg. setGroup ( "Volume" ); |
357 | 357 | ||
358 | int volalarm = cfg. readNumEntry ( "AlarmPercent", 50 ); | 358 | int volalarm = cfg. readNumEntry ( "AlarmPercent", 50 ); |
359 | if ( volalarm < 0 ) | 359 | if ( volalarm < 0 ) |
360 | volalarm = 0; | 360 | volalarm = 0; |
361 | else if ( volalarm > 100 ) | 361 | else if ( volalarm > 100 ) |
362 | volalarm = 100; | 362 | volalarm = 100; |
363 | volalarm |= ( volalarm << 8 ); | 363 | volalarm |= ( volalarm << 8 ); |
364 | 364 | ||
365 | if ( ::ioctl ( fd, MIXER_WRITE( 0 ), &volalarm ) >= 0 ) | 365 | if ( ::ioctl ( fd, MIXER_WRITE( 0 ), &volalarm ) >= 0 ) |
366 | vol_reset = true; | 366 | vol_reset = true; |
367 | } | 367 | } |
368 | } | 368 | } |
369 | 369 | ||