summaryrefslogtreecommitdiff
authorzecke <zecke>2003-10-07 13:01:51 (UTC)
committer zecke <zecke>2003-10-07 13:01:51 (UTC)
commitd72a9cfe61cbc0910373e4604220021ebbcedaeb (patch) (unidiff)
tree285eb69e028889fe8d9af57d5db5cd4304509a32
parent62d81aa76146401087e3ec9dcebd298a7d030c4a (diff)
downloadopie-d72a9cfe61cbc0910373e4604220021ebbcedaeb.zip
opie-d72a9cfe61cbc0910373e4604220021ebbcedaeb.tar.gz
opie-d72a9cfe61cbc0910373e4604220021ebbcedaeb.tar.bz2
Add a FIXME to the MediaPlayer::blank method
why don't we use ODevice::inst()->setDisplayStatus() ?
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index 9f51006..4c9afca 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -254,64 +254,65 @@ void MediaPlayer::timerEvent( QTimerEvent * ) {
254 w = videoUI()->width(); 254 w = videoUI()->width();
255 h = videoUI()->height(); 255 h = videoUI()->height();
256 256
257 if ( drawnOnScreenDisplay ) { 257 if ( drawnOnScreenDisplay ) {
258 if ( onScreenDisplayVolume > v ) { 258 if ( onScreenDisplayVolume > v ) {
259 videoUI()->repaint( (w - 200) / 2 + v * 20 + 0, h - yoff + 40, ( onScreenDisplayVolume - v ) * 20 + 9, 30, FALSE ); 259 videoUI()->repaint( (w - 200) / 2 + v * 20 + 0, h - yoff + 40, ( onScreenDisplayVolume - v ) * 20 + 9, 30, FALSE );
260 } 260 }
261 } 261 }
262 drawnOnScreenDisplay = TRUE; 262 drawnOnScreenDisplay = TRUE;
263 onScreenDisplayVolume = v; 263 onScreenDisplayVolume = v;
264 QPainter p( videoUI() ); 264 QPainter p( videoUI() );
265 p.setPen( QColor( 0x10, 0xD0, 0x10 ) ); 265 p.setPen( QColor( 0x10, 0xD0, 0x10 ) );
266 p.setBrush( QColor( 0x10, 0xD0, 0x10 ) ); 266 p.setBrush( QColor( 0x10, 0xD0, 0x10 ) );
267 267
268 QFont f; 268 QFont f;
269 f.setPixelSize( 20 ); 269 f.setPixelSize( 20 );
270 f.setBold( TRUE ); 270 f.setBold( TRUE );
271 p.setFont( f ); 271 p.setFont( f );
272 p.drawText( (w - 200) / 2, h - yoff + 20, tr( "Volume" ) ); 272 p.drawText( (w - 200) / 2, h - yoff + 20, tr( "Volume" ) );
273 273
274 for ( unsigned int i = 0; i < 10; i++ ) { 274 for ( unsigned int i = 0; i < 10; i++ ) {
275 if ( v > i ) { 275 if ( v > i ) {
276 p.drawRect( (w - 200) / 2 + i * 20 + 0, h - yoff + 40, 9, 30 ); 276 p.drawRect( (w - 200) / 2 + i * 20 + 0, h - yoff + 40, 9, 30 );
277 } else { 277 } else {
278 p.drawRect( (w - 200) / 2 + i * 20 + 3, h - yoff + 50, 3, 10 ); 278 p.drawRect( (w - 200) / 2 + i * 20 + 3, h - yoff + 50, 3, 10 );
279 } 279 }
280 } 280 }
281 } 281 }
282} 282}
283 283
284 284
285void MediaPlayer::blank( bool b ) { 285void MediaPlayer::blank( bool b ) {
286// ### FIXME use ODevice::inst()->setDisplayStatus( b );
286 fd=open("/dev/fb0",O_RDWR); 287 fd=open("/dev/fb0",O_RDWR);
287#ifdef QT_QWS_SL5XXX 288#ifdef QT_QWS_SL5XXX
288 fl= open( "/dev/fl", O_RDWR ); 289 fl= open( "/dev/fl", O_RDWR );
289#endif 290#endif
290 if (fd != -1) { 291 if (fd != -1) {
291 if ( b ) { 292 if ( b ) {
292 qDebug("do blanking"); 293 qDebug("do blanking");
293#ifdef QT_QWS_SL5XXX 294#ifdef QT_QWS_SL5XXX
294 ioctl( fd, FBIOBLANK, 1 ); 295 ioctl( fd, FBIOBLANK, 1 );
295 if(fl !=-1) { 296 if(fl !=-1) {
296 ioctl( fl, 2 ); 297 ioctl( fl, 2 );
297 ::close(fl); 298 ::close(fl);
298 } 299 }
299#else 300#else
300 ioctl( fd, FBIOBLANK, 3 ); 301 ioctl( fd, FBIOBLANK, 3 );
301#endif 302#endif
302 isBlanked = TRUE; 303 isBlanked = TRUE;
303 } else { 304 } else {
304 qDebug("do unblanking"); 305 qDebug("do unblanking");
305 ioctl( fd, FBIOBLANK, 0); 306 ioctl( fd, FBIOBLANK, 0);
306#ifdef QT_QWS_SL5XXX 307#ifdef QT_QWS_SL5XXX
307 if(fl != -1) { 308 if(fl != -1) {
308 ioctl( fl, 1); 309 ioctl( fl, 1);
309 ::close(fl); 310 ::close(fl);
310 } 311 }
311#endif 312#endif
312 isBlanked = FALSE; 313 isBlanked = FALSE;
313 } 314 }
314 close( fd ); 315 close( fd );
315 } else { 316 } else {
316 qDebug("<< /dev/fb0 could not be opened >>"); 317 qDebug("<< /dev/fb0 could not be opened >>");
317 } 318 }