Commit 47512c0d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

Fix progress dialog scale

parent f2d57a37
......@@ -320,7 +320,7 @@ int scan_Next( scan_t *p_scan, scan_configuration_t *p_cfg )
if( p_scan->p_dialog == NULL )
p_scan->p_dialog = dialog_ProgressCreate( p_scan->p_obj, _("Scanning DVB-T"), psz_text, _("Cancel") );
if( p_scan->p_dialog != NULL )
dialog_ProgressSet( p_scan->p_dialog, psz_text, 100 * f_position );
dialog_ProgressSet( p_scan->p_dialog, psz_text, f_position );
free( psz_text );
}
......
......@@ -2415,8 +2415,8 @@ static void AVI_IndexCreate( demux_t *p_demux )
if( dialog_ProgressCancelled( p_dialog ) )
break;
double f_pos = 100.0 * stream_Tell( p_demux->s ) /
stream_Size( p_demux->s );
float f_pos = (float)stream_Tell( p_demux->s ) /
(float)stream_Size( p_demux->s );
dialog_ProgressSet( p_dialog, NULL, f_pos );
i_dialog_update = mdate();
......
......@@ -1606,7 +1606,7 @@ static void* update_DownloadReal( vlc_object_t *p_this )
l_downloaded += i_read;
psz_downloaded = size_str( l_downloaded );
f_progress = 100.0*(float)l_downloaded/(float)l_size;
f_progress = (float)l_downloaded/(float)l_size;
if( asprintf( &psz_status, _( "%s\nDownloading... %s/%s %.1f%% done" ),
p_update->release.psz_url, psz_downloaded, psz_size,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment