From aa9eba407a8236c72822d24643b58d4d48ae80c0 Mon Sep 17 00:00:00 2001 From: harlekin Date: Fri, 16 Aug 2002 15:16:13 +0000 Subject: blank now works, mail key on ipaq --- diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 56203e0..604ed3a 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp @@ -532,11 +532,12 @@ void AudioWidget::keyReleaseEvent( QKeyEvent *e) case Key_F10: //contacts break; case Key_F11: //menu + mediaPlayerState->toggleBlank(); break; case Key_F12: //home break; case Key_F13: //mail - mediaPlayerState->toggleBlank(); + mediaPlayerState->toggleBlank(); break; case Key_Space: { if(mediaPlayerState->playing()) { diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 858b51f..87f4f0c 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp @@ -29,6 +29,8 @@ extern PlayListWidget *playList; extern MediaPlayerState *mediaPlayerState; +#define FBIOBLANK 0x4611 + MediaPlayer::MediaPlayer( QObject *parent, const char *name ) : QObject( parent, name ), volumeDirection( 0 ), currentFile( NULL ) { @@ -252,8 +254,7 @@ void MediaPlayer::timerEvent( QTimerEvent * ) { void MediaPlayer::blank( bool b ) { fd=open("/dev/fb0",O_RDWR); if (fd != -1) { - - if ( !b ) { + if ( b ) { qDebug("do blanking"); ioctl( fd, FBIOBLANK, 3 ); isBlanked = TRUE; @@ -263,6 +264,8 @@ void MediaPlayer::blank( bool b ) { isBlanked = FALSE; } close( fd ); + } else { + qDebug("<< /dev/fb0 could not be opend >>"); } } @@ -283,8 +286,8 @@ void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { break; case Key_F13: //mail qDebug("Blank here"); -// mediaPlayerState->toggleBlank(); - break; + // mediaPlayerState->toggleBlank(); + break; } } diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp index 6aafb88..6833e07 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp @@ -115,7 +115,7 @@ void MediaPlayerState::setIsStreaming( bool b ) { } -void MediaPlayerState::setBlank( bool b ) { +void MediaPlayerState::setFullscreen( bool b ) { if ( isFullscreen == b ) { return; } @@ -124,7 +124,7 @@ void MediaPlayerState::setBlank( bool b ) { } -void MediaPlayerState::setFullscreen( bool b ) { +void MediaPlayerState::setBlanked( bool b ) { if ( isBlanked == b ) { return; } @@ -274,7 +274,7 @@ void MediaPlayerState::togglePlaying() { } void MediaPlayerState::toggleBlank() { - setBlank( !isBlanked); + setBlanked( !isBlanked); } diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h index 3baffd3..b3431d7 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.h +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h @@ -78,7 +78,7 @@ public slots: void updatePosition( long p ); void setLength( long l ); void setView( char v ); - void setBlank( bool b ); + void setBlanked( bool b ); void setPrev(); void setNext(); -- cgit v0.9.0.2