mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 14:42:30 +00:00
Merge pull request #2499 from heuripedes/master
(tasks) Show finished tasks progress too
This commit is contained in:
commit
df5c8168d1
@ -54,24 +54,6 @@ static rarch_task_t *task_queue_get(task_queue_t *queue)
|
|||||||
return task;
|
return task;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rarch_task_internal_gather(void)
|
|
||||||
{
|
|
||||||
rarch_task_t *task;
|
|
||||||
while ((task = task_queue_get(&tasks_finished)) != NULL)
|
|
||||||
{
|
|
||||||
if (task->callback)
|
|
||||||
task->callback(task->task_data, task->user_data, task->error);
|
|
||||||
|
|
||||||
if (task->error)
|
|
||||||
free(task->error);
|
|
||||||
|
|
||||||
if (task->title)
|
|
||||||
free(task->title);
|
|
||||||
|
|
||||||
free(task);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void push_task_progress(rarch_task_t *task)
|
static void push_task_progress(rarch_task_t *task)
|
||||||
{
|
{
|
||||||
if (task->title)
|
if (task->title)
|
||||||
@ -94,6 +76,26 @@ static void push_task_progress(rarch_task_t *task)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void rarch_task_internal_gather(void)
|
||||||
|
{
|
||||||
|
rarch_task_t *task;
|
||||||
|
while ((task = task_queue_get(&tasks_finished)) != NULL)
|
||||||
|
{
|
||||||
|
push_task_progress(task);
|
||||||
|
|
||||||
|
if (task->callback)
|
||||||
|
task->callback(task->task_data, task->user_data, task->error);
|
||||||
|
|
||||||
|
if (task->error)
|
||||||
|
free(task->error);
|
||||||
|
|
||||||
|
if (task->title)
|
||||||
|
free(task->title);
|
||||||
|
|
||||||
|
free(task);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void regular_push_running(rarch_task_t *task)
|
static void regular_push_running(rarch_task_t *task)
|
||||||
{
|
{
|
||||||
task_queue_put(&tasks_running, task);
|
task_queue_put(&tasks_running, task);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user