-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 @@ -26,24 +26,25 @@ extern AudioWidget *audioUI; extern VideoWidget *videoUI; extern PlayListWidget *playList; extern MediaPlayerState *mediaPlayerState; #define FBIOBLANK 0x4611 MediaPlayer::MediaPlayer( QObject *parent, const char *name ) : QObject( parent, name ), volumeDirection( 0 ), currentFile( NULL ) { + fd=-1;fl=-1; playList->setCaption( tr( "OpiePlayer: Initializating" ) ); qApp->processEvents(); // QPEApplication::grabKeyboard(); // EVIL connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) ); connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) ); connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) ); connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); @@ -289,32 +290,49 @@ void MediaPlayer::timerEvent( QTimerEvent * ) { if ( v > i ) { p.drawRect( (w - 200) / 2 + i * 20 + 0, h - yoff + 40, 9, 30 ); } else { p.drawRect( (w - 200) / 2 + i * 20 + 3, h - yoff + 50, 3, 10 ); } } } } void MediaPlayer::blank( bool b ) { fd=open("/dev/fb0",O_RDWR); +#ifdef QT_QWS_EBX + fl= open( "/dev/fl", O_RDWR ); +#endif if (fd != -1) { if ( b ) { qDebug("do blanking"); +#ifdef QT_QWS_EBX + ioctl( fd, FBIOBLANK, 1 ); + if(fl !=-1) { + ioctl( fl, 2 ); + ::close(fl); + } +#else ioctl( fd, FBIOBLANK, 3 ); +#endif isBlanked = TRUE; } else { qDebug("do unblanking"); ioctl( fd, FBIOBLANK, 0); +#ifdef QT_QWS_EBX + if(fl != -1) { + ioctl( fl, 1); + ::close(fl); + } +#endif isBlanked = FALSE; } close( fd ); } else { qDebug("<< /dev/fb0 could not be opened >>"); } } void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { switch ( e->key() ) { ////////////////////////////// Zaurus keys case Key_Home: |