diff options
| author | 2026-11-09 19:11:29 +0100 | |
|---|---|---|
| committer | 2026-11-09 19:11:29 +0100 | |
| commit | 6cead6bce881ce7bcc6878852f292de8050e20e6 (patch) | |
| tree | 2a738f3277d82da24ab209f8f704a7be31207439 /src/common.c | |
| parent | ae8cfb4aa919000b283a0fe7db96b1a321a010d3 (diff) | |
| download | idevicerestore-6cead6bce881ce7bcc6878852f292de8050e20e6.tar.gz idevicerestore-6cead6bce881ce7bcc6878852f292de8050e20e6.tar.bz2 | |
Diffstat (limited to 'src/common.c')
| -rw-r--r-- | src/common.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/common.c b/src/common.c index 60b1a49..bd06691 100644 --- a/src/common.c +++ b/src/common.c @@ -843,10 +843,18 @@ static const char* restore_step_label(int step) } } -void idevicerestore_progress(struct idevicerestore_client_t* client, int step, double progress) +static int last_global_step = -1; + +void idevicerestore_progress_finish(void) { - static int last_global_step = -1; + if (last_global_step != -1) { + finalize_progress(GLOBAL_PROGRESS_TAG); + last_global_step = -1; + } +} +void idevicerestore_progress(struct idevicerestore_client_t* client, int step, double progress) +{ if (client && client->progress_cb) { client->progress_cb(step, progress, client->progress_cb_data); return; |
