-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 606f8e9..f0a01a1 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp | |||
@@ -30,16 +30,17 @@ extern PlayListWidget *playList; | |||
30 | extern MediaPlayerState *mediaPlayerState; | 30 | extern MediaPlayerState *mediaPlayerState; |
31 | 31 | ||
32 | 32 | ||
33 | #define FBIOBLANK 0x4611 | 33 | #define FBIOBLANK 0x4611 |
34 | 34 | ||
35 | MediaPlayer::MediaPlayer( QObject *parent, const char *name ) | 35 | MediaPlayer::MediaPlayer( QObject *parent, const char *name ) |
36 | : QObject( parent, name ), volumeDirection( 0 ), currentFile( NULL ) { | 36 | : QObject( parent, name ), volumeDirection( 0 ), currentFile( NULL ) { |
37 | 37 | ||
38 | fd=-1;fl=-1; | ||
38 | playList->setCaption( tr( "OpiePlayer: Initializating" ) ); | 39 | playList->setCaption( tr( "OpiePlayer: Initializating" ) ); |
39 | 40 | ||
40 | qApp->processEvents(); | 41 | qApp->processEvents(); |
41 | // QPEApplication::grabKeyboard(); // EVIL | 42 | // QPEApplication::grabKeyboard(); // EVIL |
42 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 43 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
43 | 44 | ||
44 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) ); | 45 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) ); |
45 | 46 | ||
@@ -293,24 +294,41 @@ void MediaPlayer::timerEvent( QTimerEvent * ) { | |||
293 | } | 294 | } |
294 | } | 295 | } |
295 | } | 296 | } |
296 | } | 297 | } |
297 | 298 | ||
298 | 299 | ||
299 | void MediaPlayer::blank( bool b ) { | 300 | void MediaPlayer::blank( bool b ) { |
300 | fd=open("/dev/fb0",O_RDWR); | 301 | fd=open("/dev/fb0",O_RDWR); |
302 | #ifdef QT_QWS_EBX | ||
303 | fl= open( "/dev/fl", O_RDWR ); | ||
304 | #endif | ||
301 | if (fd != -1) { | 305 | if (fd != -1) { |
302 | if ( b ) { | 306 | if ( b ) { |
303 | qDebug("do blanking"); | 307 | qDebug("do blanking"); |
308 | #ifdef QT_QWS_EBX | ||
309 | ioctl( fd, FBIOBLANK, 1 ); | ||
310 | if(fl !=-1) { | ||
311 | ioctl( fl, 2 ); | ||
312 | ::close(fl); | ||
313 | } | ||
314 | #else | ||
304 | ioctl( fd, FBIOBLANK, 3 ); | 315 | ioctl( fd, FBIOBLANK, 3 ); |
316 | #endif | ||
305 | isBlanked = TRUE; | 317 | isBlanked = TRUE; |
306 | } else { | 318 | } else { |
307 | qDebug("do unblanking"); | 319 | qDebug("do unblanking"); |
308 | ioctl( fd, FBIOBLANK, 0); | 320 | ioctl( fd, FBIOBLANK, 0); |
321 | #ifdef QT_QWS_EBX | ||
322 | if(fl != -1) { | ||
323 | ioctl( fl, 1); | ||
324 | ::close(fl); | ||
325 | } | ||
326 | #endif | ||
309 | isBlanked = FALSE; | 327 | isBlanked = FALSE; |
310 | } | 328 | } |
311 | close( fd ); | 329 | close( fd ); |
312 | } else { | 330 | } else { |
313 | qDebug("<< /dev/fb0 could not be opened >>"); | 331 | qDebug("<< /dev/fb0 could not be opened >>"); |
314 | } | 332 | } |
315 | } | 333 | } |
316 | 334 | ||