Diffstat (limited to 'libopie2/opiecore/device/odevice_simpad.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_simpad.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libopie2/opiecore/device/odevice_simpad.cpp b/libopie2/opiecore/device/odevice_simpad.cpp index fd46b95..34876da 100644 --- a/libopie2/opiecore/device/odevice_simpad.cpp +++ b/libopie2/opiecore/device/odevice_simpad.cpp | |||
@@ -298,48 +298,50 @@ bool SIMpad::setLedState ( OLed l, OLedState st ) | |||
298 | 298 | ||
299 | return false; | 299 | return false; |
300 | } | 300 | } |
301 | 301 | ||
302 | 302 | ||
303 | bool SIMpad::filter ( int /*unicode*/, int /*keycode*/, int /*modifiers*/, bool /*isPress*/, bool /*autoRepeat*/ ) | 303 | bool SIMpad::filter ( int /*unicode*/, int /*keycode*/, int /*modifiers*/, bool /*isPress*/, bool /*autoRepeat*/ ) |
304 | { | 304 | { |
305 | //TODO | 305 | //TODO |
306 | return false; | 306 | return false; |
307 | } | 307 | } |
308 | 308 | ||
309 | void SIMpad::timerEvent ( QTimerEvent * ) | 309 | void SIMpad::timerEvent ( QTimerEvent * ) |
310 | { | 310 | { |
311 | killTimer ( m_power_timer ); | 311 | killTimer ( m_power_timer ); |
312 | m_power_timer = 0; | 312 | m_power_timer = 0; |
313 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false ); | 313 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false ); |
314 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); | 314 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); |
315 | } | 315 | } |
316 | 316 | ||
317 | 317 | ||
318 | void SIMpad::playAlarmSound() | 318 | void SIMpad::playAlarmSound() |
319 | { | 319 | { |
320 | #ifndef QT_NO_SOUND | 320 | #ifndef QT_NO_SOUND |
321 | static Sound snd ( "alarm" ); | 321 | static Sound snd ( "alarm" ); |
322 | if(!snd.isFinished()) | ||
323 | return; | ||
322 | 324 | ||
323 | /* save as the Sound is static! */ | 325 | /* save as the Sound is static! */ |
324 | changeMixerForAlarm( 0, "/dev/sound/mixer" , &snd); | 326 | changeMixerForAlarm( 0, "/dev/sound/mixer" , &snd); |
325 | snd. play(); | 327 | snd. play(); |
326 | #endif | 328 | #endif |
327 | } | 329 | } |
328 | 330 | ||
329 | 331 | ||
330 | bool SIMpad::suspend() // Must override because SIMpad does NOT have apm | 332 | bool SIMpad::suspend() // Must override because SIMpad does NOT have apm |
331 | { | 333 | { |
332 | qDebug( "ODevice for SIMpad: suspend()" ); | 334 | qDebug( "ODevice for SIMpad: suspend()" ); |
333 | if ( !isQWS( ) ) // only qwsserver is allowed to suspend | 335 | if ( !isQWS( ) ) // only qwsserver is allowed to suspend |
334 | return false; | 336 | return false; |
335 | 337 | ||
336 | /* | 338 | /* |
337 | * we need to save the screen content | 339 | * we need to save the screen content |
338 | * then go to suspend using ODevice::suspend | 340 | * then go to suspend using ODevice::suspend |
339 | * and finally restore the screen content | 341 | * and finally restore the screen content |
340 | */ | 342 | */ |
341 | (void)::system( "cat /dev/fb/0 > /tmp/.buffer" ); | 343 | (void)::system( "cat /dev/fb/0 > /tmp/.buffer" ); |
342 | bool res = ODevice::suspend(); | 344 | bool res = ODevice::suspend(); |
343 | 345 | ||
344 | /* | 346 | /* |
345 | * restore | 347 | * restore |