(tasks) Show finished tasks progress too

This commit is contained in:
Higor Eurípedes 2015-11-30 14:22:49 -03:00
parent c03e1547b1
commit 916444f977

View File

@ -54,24 +54,6 @@ static rarch_task_t *task_queue_get(task_queue_t *queue)
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)
{
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)
{
task_queue_put(&tasks_running, task);