summaryrefslogtreecommitdiffstats
path: root/src/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.c')
-rw-r--r--src/common.c12
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;