Changeset 3075

Show
Ignore:
Timestamp:
02/17/10 08:12:23 (7 months ago)
Author:
scdbackup
Message:

Avoided random percentage display at start of blanking

Location:
libburn/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • libburn/trunk/cdrskin/cdrskin_timestamp.h

    r3073 r3075  
    1 #define Cdrskin_timestamP "2010.02.16.194147" 
     1#define Cdrskin_timestamP "2010.02.17.141409" 
  • libburn/trunk/libburn/async.c

    r3066 r3075  
    233233} 
    234234 
     235static void reset_progress(struct burn_drive *d, int sessions, int tracks, 
     236                                int indices, int sectors, int flag) 
     237{ 
     238        /* reset the progress indicator */ 
     239        d->progress.session = 0; 
     240        d->progress.sessions = sessions; 
     241        d->progress.track = 0; 
     242        d->progress.tracks = tracks; 
     243        d->progress.index = 0; 
     244        d->progress.indices = indices; 
     245        d->progress.start_sector = 0; 
     246        d->progress.sectors = sectors; 
     247        d->progress.sector = 0; 
     248} 
     249 
     250 
    235251int burn_drive_scan(struct burn_drive_info *drives[], unsigned int *n_drives) 
    236252{ 
     
    315331        /* a ssert(!SCAN_GOING()); */ 
    316332        /* a ssert(!find_worker(drive)); */ 
     333 
    317334        if((drive == NULL)) { 
    318335                libdax_msgs_submit(libdax_messenger, drive->global_index, 
     
    330347                return; 
    331348        } 
     349 
     350        reset_progress(drive, 1, 1, 1, 0x10000, 0); 
     351 
    332352        /* A70103 : will be set to 0 by burn_disc_erase_sync() */ 
    333353        drive->cancel = 1; 
     
    383403        int ok = 0, ret; 
    384404        char msg[160]; 
     405 
     406        reset_progress(drive, 1, 1, 1, 0x10000, 0); 
    385407 
    386408        if ((SCAN_GOING()) || find_worker(drive) != NULL) { 
     
    548570        } 
    549571 
     572        reset_progress(d, disc->sessions, disc->session[0]->tracks, 
     573                         disc->session[0]->track[0]->indices, 0, 0); 
     574 
    550575        /* For the next lines any return indicates failure */ 
    551576        d->cancel = 1; 
  • libburn/trunk/libburn/drive.c

    r3066 r3075  
    622622 
    623623        d->cancel = 0; 
    624         d->busy = BURN_DRIVE_ERASING; 
    625         d->erase(d, fast); 
     624 
     625#ifdef Libburn_reset_progress_asynC 
     626        /* <<< This is now done in async.c */ 
    626627        /* reset the progress */ 
    627628        d->progress.session = 0; 
     
    634635        d->progress.sectors = 0x10000; 
    635636        d->progress.sector = 0; 
     637#endif /* Libburn_reset_progress_asynC */ 
     638 
     639        d->erase(d, fast); 
     640        d->busy = BURN_DRIVE_ERASING; 
     641 
    636642        /* read the initial 0 stage */ 
    637643        while (!d->test_unit_ready(d) && d->get_erase_progress(d) == 0) 
     
    660666        struct buffer buf, *buf_mem = d->buffer; 
    661667 
     668#ifdef Libburn_reset_progress_asynC 
     669        /* <<< This is now done in async.c */ 
    662670        /* reset the progress */ 
    663671        d->progress.session = 0; 
     
    670678        d->progress.sectors = 0x10000; 
    671679        d->progress.sector = 0; 
     680#endif /* Libburn_reset_progress_asynC */ 
     681 
    672682        stages = 1 + ((flag & 1) && size > 1024 * 1024); 
    673683        d->cancel = 0; 
  • libburn/trunk/libburn/write.c

    r3069 r3075  
    943943        d->cancel = 0; 
    944944 
     945#ifdef Libburn_reset_progress_asynC 
     946        /* <<< This is now done in async.c */ 
    945947        /* init progress before showing the state */ 
    946948        d->progress.session = 0; 
     
    957959        d->progress.sector = 0; 
    958960        d->progress.track = 0; 
     961#endif /* Libburn_reset_progress_asynC */ 
    959962 
    960963        /* ts A61023 */