summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-10-17 02:45:43 (UTC)
committer llornkcor <llornkcor>2002-10-17 02:45:43 (UTC)
commitce65a2b92c8d647b0621120358bde62f7a893129 (patch) (unidiff)
tree819bc79171edb15aff5e0da7224110f0b5928906
parent4f2dc0f59515dd456dbe7b32eeda835ea231fca9 (diff)
downloadopie-ce65a2b92c8d647b0621120358bde62f7a893129.zip
opie-ce65a2b92c8d647b0621120358bde62f7a893129.tar.gz
opie-ce65a2b92c8d647b0621120358bde62f7a893129.tar.bz2
zaurus screenblanking - maybe better, maybe not- needs testing
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp18
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
@@ -32,12 +32,13 @@ extern MediaPlayerState *mediaPlayerState;
32 32
33#define FBIOBLANK 0x4611 33#define FBIOBLANK 0x4611
34 34
35MediaPlayer::MediaPlayer( QObject *parent, const char *name ) 35MediaPlayer::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
@@ -295,20 +296,37 @@ void MediaPlayer::timerEvent( QTimerEvent * ) {
295 } 296 }
296} 297}
297 298
298 299
299void MediaPlayer::blank( bool b ) { 300void 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 }