summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp3
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp11
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.cpp6
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.h2
4 files changed, 13 insertions, 9 deletions
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
@@ -523,29 +523,30 @@ void AudioWidget::keyReleaseEvent( QKeyEvent *e)
{
switch ( e->key() ) {
////////////////////////////// Zaurus keys
case Key_Home:
break;
case Key_F9: //activity
hide();
// qDebug("Audio F9");
break;
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()) {
// toggleButton(1);
mediaPlayerState->setPlaying(FALSE);
// toggleButton(1);
} else {
// toggleButton(0);
mediaPlayerState->setPlaying(TRUE);
// toggleButton(0);
}
}
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
@@ -20,24 +20,26 @@
// for setBacklight()
#include <linux/fb.h>
#include <sys/file.h>
#include <sys/ioctl.h>
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 ) {
// xineControl = new XineControl();
// 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 ) ) );
@@ -243,52 +245,53 @@ void MediaPlayer::timerEvent( QTimerEvent * ) {
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);
if (fd != -1) {
-
- if ( !b ) {
+ if ( b ) {
qDebug("do blanking");
ioctl( fd, FBIOBLANK, 3 );
isBlanked = TRUE;
} else {
qDebug("do unblanking");
ioctl( fd, FBIOBLANK, 0);
isBlanked = FALSE;
}
close( fd );
+ } else {
+ qDebug("<< /dev/fb0 could not be opend >>");
}
}
void MediaPlayer::keyReleaseEvent( QKeyEvent *e) {
switch ( e->key() ) {
////////////////////////////// Zaurus keys
case Key_Home:
break;
case Key_F9: //activity
break;
case Key_F10: //contacts
break;
case Key_F11: //menu
break;
case Key_F12: //home
qDebug("Blank here");
// mediaPlayerState->toggleBlank();
break;
case Key_F13: //mail
qDebug("Blank here");
-// mediaPlayerState->toggleBlank();
- break;
+ // mediaPlayerState->toggleBlank();
+ break;
}
}
void MediaPlayer::cleanUp() {
// QPEApplication::grabKeyboard();
// QPEApplication::ungrabKeyboard();
}
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
@@ -106,34 +106,34 @@ char MediaPlayerState::view() {
}
// slots
void MediaPlayerState::setIsStreaming( bool b ) {
if ( isStreaming == b ) {
return;
}
isStreaming = b;
}
-void MediaPlayerState::setBlank( bool b ) {
+void MediaPlayerState::setFullscreen( bool b ) {
if ( isFullscreen == b ) {
return;
}
isFullscreen = b;
emit fullscreenToggled(b);
}
-void MediaPlayerState::setFullscreen( bool b ) {
+void MediaPlayerState::setBlanked( bool b ) {
if ( isBlanked == b ) {
return;
}
isBlanked = b;
emit blankToggled(b);
}
void MediaPlayerState::setScaled( bool b ) {
if ( isScaled == b ) {
return;
}
@@ -265,17 +265,17 @@ void MediaPlayerState::togglePlaylist() {
setPlaylist( !usePlaylist);
}
void MediaPlayerState::togglePaused() {
setPaused( !isPaused);
}
void MediaPlayerState::togglePlaying() {
setPlaying( !isPlaying);
}
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
@@ -69,25 +69,25 @@ public slots:
void setFullscreen( bool b );
void setScaled( bool b );
void setLooping( bool b );
void setShuffled( bool b );
void setPlaylist( bool b );
void setPaused( bool b );
void setPlaying( bool b );
void setStop( bool b );
void setPosition( long p );
void updatePosition( long p );
void setLength( long l );
void setView( char v );
- void setBlank( bool b );
+ void setBlanked( bool b );
void setPrev();
void setNext();
void setList();
void setVideo();
void setAudio();
void toggleFullscreen();
void toggleScaled();
void toggleLooping();
void toggleShuffled();
void togglePlaylist();