From 46bf7cce063a4ef1469e9381d5be27535b8e0e67 Mon Sep 17 00:00:00 2001 From: pontscho Date: Wed, 12 Sep 2001 22:12:05 +0000 Subject: add new sumbols git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1889 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Gui/mplayer/mw.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'Gui/mplayer/mw.h') diff --git a/Gui/mplayer/mw.h b/Gui/mplayer/mw.h index 6a4d4bb581..947dd91c01 100644 --- a/Gui/mplayer/mw.h +++ b/Gui/mplayer/mw.h @@ -73,18 +73,17 @@ char * Translate( char * str ) case '6': t=mplShMem->LengthInSec; goto calclengthhhmmss; case '1': t=mplShMem->TimeSec; calclengthhhmmss: - s=t%60; t=( t - s ) / 60; m=t%60; h=t/60; - sprintf( tmp,"%02d:%02d:%02d",h,m,s ); strcat( trbuf,tmp ); + sprintf( tmp,"%02d:%02d:%02d",t/3600,t/60%60,t%60 ); strcat( trbuf,tmp ); break; case '7': t=mplShMem->LengthInSec; goto calclengthmmmmss; case '2': t=mplShMem->TimeSec; calclengthmmmmss: - s=t%60; m=( ( t - s ) / 60 ) % 60; - sprintf( tmp,"%04d:%02d",m,s ); strcat( trbuf,tmp ); + sprintf( tmp,"%04d:%02d",t/60,t%60 ); strcat( trbuf,tmp ); break; - case '3': sprintf( tmp,"%02d",( mplShMem->TimeSec - ( mplShMem->TimeSec % 60 ) ) / 3600 ); strcat( trbuf,tmp ); break; - case '4': sprintf( tmp,"%02d",( ( mplShMem->TimeSec - ( mplShMem->TimeSec % 60 ) ) / 60 ) % 60 ); strcat( trbuf,tmp ); break; + case '3': sprintf( tmp,"%02d",mplShMem->TimeSec / 3600 ); strcat( trbuf,tmp ); break; + case '4': sprintf( tmp,"%02d",( ( mplShMem->TimeSec / 60 ) % 60 ) ); strcat( trbuf,tmp ); break; case '5': sprintf( tmp,"%02d",mplShMem->TimeSec % 60 ); strcat( trbuf,tmp ); break; + case '8': sprintf( tmp,"%01d:%02d:%02d",mplShMem->TimeSec / 3600,( mplShMem->TimeSec / 60 ) % 60,mplShMem->TimeSec % 60 ); strcat( trbuf,tmp ); break; case 'v': sprintf( tmp,"%3.2f%%",mplShMem->Volume ); strcat( trbuf,tmp ); break; case 'V': sprintf( tmp,"%3.1f",mplShMem->Volume ); strcat( trbuf,tmp ); break; case 'b': sprintf( tmp,"%3.2f%%",mplShMem->Balance ); strcat( trbuf,tmp ); break; @@ -93,6 +92,14 @@ calclengthmmmmss: case 's': if ( mplShMem->Playing == 0 ) strcat( trbuf,"s" ); break; case 'l': if ( mplShMem->Playing == 1 ) strcat( trbuf,"p" ); break; case 'e': if ( mplShMem->Playing == 2 ) strcat( trbuf,"e" ); break; + case 'a': + switch ( mplShMem->AudioType ) + { + case 0: strcat( trbuf,"n" ); break; + case 1: strcat( trbuf,"m" ); break; + case 2: strcat( trbuf,"t" ); break; + } + break; case '$': strcat( trbuf,"$" ); break; default: continue; } -- cgit v1.2.3