@@ -539,17 +539,15 @@ void winamp_SetPan(int pan) {
539539/* display info box (ALT+3) */
540540int winamp_InfoBox (const in_char * fn , HWND hwnd ) {
541541 char description [1024 ] = {0 }, tmp [1024 ] = {0 };
542- size_t description_size = 1024 ;
542+ TCHAR tbuf [ 1024 ] = { 0 } ;
543543 double tmpVolume = 1.0 ;
544544
545- concatn (description_size ,description ,PLUGIN_INFO "\n\n" );
546-
547545 if (!fn || !* fn ) {
548546 /* no filename = current playing file */
549547 if (!vgmstream )
550548 return 0 ;
551549
552- describe_vgmstream (vgmstream ,description ,description_size );
550+ describe_vgmstream (vgmstream ,description ,sizeof ( description ) );
553551 }
554552 else {
555553 /* some other file in playlist given by filename */
@@ -569,24 +567,21 @@ int winamp_InfoBox(const in_char *fn, HWND hwnd) {
569567 vgmstream_mixing_autodownmix (infostream , settings .downmix_channels );
570568 vgmstream_mixing_enable (infostream , 0 , NULL , NULL );
571569
572- describe_vgmstream (infostream ,description ,description_size );
570+ describe_vgmstream (infostream ,description ,sizeof ( description ) );
573571
574572 close_vgmstream (infostream );
575573 infostream = NULL ;
576574 tmpVolume = get_album_gain_volume (fn );
577575 }
578576
577+ snprintf (tmp , sizeof (tmp ), "\nvolume: %.6f\n" , tmpVolume );
578+ concatn (sizeof (description ), description , tmp );
579579
580- {
581- TCHAR buf [1024 ] = {0 };
582- size_t buf_size = 1024 ;
580+ concatn (sizeof (description ), description , "\n" PLUGIN_INFO );
583581
584- snprintf ( tmp , sizeof (tmp ), "\nvolume: %.6f" , tmpVolume );
585- concatn ( description_size , description , tmp );
582+ cfg_char_to_wchar ( tbuf , sizeof (tbuf ) / sizeof ( TCHAR ), description );
583+ MessageBox ( hwnd , tbuf , TEXT ( "Stream info" ), MB_OK );
586584
587- cfg_char_to_wchar (buf , buf_size , description );
588- MessageBox (hwnd ,buf ,TEXT ("Stream info" ),MB_OK );
589- }
590585 return 0 ;
591586}
592587
0 commit comments