From 560f8dda60d9a4310423f8c262310f5581f21f8f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 20 Jun 2016 06:02:50 +0200 Subject: [PATCH] Remove tasks_internal.c - no longer needed --- Makefile.common | 1 - griffin/griffin.c | 1 - libretro-common/include/queues/task_queue.h | 2 - libretro-common/queues/task_queue.c | 5 +- tasks/tasks_internal.c | 59 --------------------- 5 files changed, 1 insertion(+), 67 deletions(-) delete mode 100644 tasks/tasks_internal.c diff --git a/Makefile.common b/Makefile.common index 26b03cd821..bc041798fb 100644 --- a/Makefile.common +++ b/Makefile.common @@ -129,7 +129,6 @@ OBJ += frontend/frontend.o \ runloop.o \ libretro-common/algorithms/mismatch.o \ libretro-common/queues/task_queue.o \ - tasks/tasks_internal.o \ tasks/task_content.o \ tasks/task_save_ram.o \ tasks/task_save_state.o \ diff --git a/griffin/griffin.c b/griffin/griffin.c index 639759c8ac..8d87dbd6b0 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -756,7 +756,6 @@ RETROARCH #include "../retroarch.c" #include "../runloop.c" #include "../libretro-common/queues/task_queue.c" -#include "../tasks/tasks_internal.c" #include "../msg_hash.c" #ifdef HAVE_LANGEXTRA diff --git a/libretro-common/include/queues/task_queue.h b/libretro-common/include/queues/task_queue.h index 87cb0fa861..93e1f65c87 100644 --- a/libretro-common/include/queues/task_queue.h +++ b/libretro-common/include/queues/task_queue.h @@ -182,8 +182,6 @@ typedef struct task_retriever_data task_retriever_info_t *list; } task_retriever_data_t; -void task_queue_push_progress(retro_task_t *task); - bool task_queue_ctl(enum task_queue_ctl_state state, void *data); void *task_queue_retriever_info_next(task_retriever_info_t **link); diff --git a/libretro-common/queues/task_queue.c b/libretro-common/queues/task_queue.c index ada5731eb2..0f09c5e0ed 100644 --- a/libretro-common/queues/task_queue.c +++ b/libretro-common/queues/task_queue.c @@ -52,7 +52,6 @@ struct retro_task_impl static task_queue_t tasks_running = {NULL, NULL}; static task_queue_t tasks_finished = {NULL, NULL}; -#ifndef RARCH_INTERNAL static void task_queue_msg_push(unsigned prio, unsigned duration, bool flush, const char *fmt, ...) { @@ -66,7 +65,7 @@ static void task_queue_msg_push(unsigned prio, unsigned duration, /* print something here */ } -void task_queue_push_progress(retro_task_t *task) +static void task_queue_push_progress(retro_task_t *task) { if (task->title) { @@ -88,7 +87,6 @@ void task_queue_push_progress(retro_task_t *task) } } } -#endif static void task_queue_put(task_queue_t *queue, retro_task_t *task) { @@ -115,7 +113,6 @@ static retro_task_t *task_queue_get(task_queue_t *queue) return task; } - static void retro_task_internal_gather(void) { retro_task_t *task = NULL; diff --git a/tasks/tasks_internal.c b/tasks/tasks_internal.c deleted file mode 100644 index 0ba68a28ba..0000000000 --- a/tasks/tasks_internal.c +++ /dev/null @@ -1,59 +0,0 @@ -/* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Higor Euripedes - * Copyright (C) 2011-2016 - Daniel De Matteis - * - * RetroArch is free software: you can redistribute it and/or modify it under the terms - * of the GNU General Public License as published by the Free Software Found- - * ation, either version 3 of the License, or (at your option) any later version. - * - * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with RetroArch. - * If not, see . - */ - -#include -#include -#include - -#include "tasks_internal.h" - -#include "../msg_hash.h" -#include "../runloop.h" - -static void task_queue_msg_push(unsigned prio, unsigned duration, - bool flush, const char *fmt, ...) -{ - char buf[1024]; - va_list ap; - - va_start(ap, fmt); - vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - runloop_msg_queue_push(buf, prio, duration, flush); -} - -void task_queue_push_progress(retro_task_t *task) -{ - if (task->title && !task->mute) - { - if (task->finished) - { - if (task->error) - task_queue_msg_push(1, 60, true, "%s: %s", - msg_hash_to_str(MSG_TASK_FAILED), task->title); - else - task_queue_msg_push(1, 60, true, "100%%: %s", task->title); - } - else - { - if (task->progress >= 0 && task->progress <= 100) - task_queue_msg_push(1, 60, true, "%i%%: %s", - task->progress, task->title); - else - task_queue_msg_push(1, 60, true, "%s...", task->title); - } - } -}