| 1876 | } |
| 1877 | |
| 1878 | static void UpdateState2(hb_scan_t *scan, int title) |
| 1879 | { |
| 1880 | hb_state_t state; |
| 1881 | |
| 1882 | hb_get_state2(scan->h, &state); |
| 1883 | #define p state.param.scanning |
| 1884 | /* Update the UI */ |
| 1885 | state.state = HB_STATE_SCANNING; |
| 1886 | p.title_cur = title; |
| 1887 | p.title_count = hb_list_count( scan->title_set->list_title ); |
| 1888 | p.preview_cur = 1; |
| 1889 | p.preview_count = scan->preview_count; |
| 1890 | if (scan->title_index) |
| 1891 | p.progress = (float)(p.title_cur - 1) / p.title_count; |
| 1892 | else |
| 1893 | p.progress = 0.5 + 0.5 * (float)(p.title_cur - 1) / p.title_count; |
| 1894 | #undef p |
| 1895 | |
| 1896 | hb_set_state(scan->h, &state); |
| 1897 | } |
| 1898 | |
| 1899 | static void UpdateState3(hb_scan_t *scan, int preview) |
| 1900 | { |
no test coverage detected