mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 03:32:46 +00:00
Rename task_ctl to task_queue_ctl
This commit is contained in:
parent
08eb091610
commit
6e9bc55dd6
@ -2826,9 +2826,9 @@ void general_write_handler(void *data)
|
||||
case MENU_LABEL_VIDEO_THREADED:
|
||||
{
|
||||
if (*setting->value.boolean)
|
||||
task_ctl(TASK_CTL_SET_THREADED, NULL);
|
||||
task_queue_ctl(TASK_CTL_SET_THREADED, NULL);
|
||||
else
|
||||
task_ctl(TASK_CTL_UNSET_THREADED, NULL);
|
||||
task_queue_ctl(TASK_CTL_UNSET_THREADED, NULL);
|
||||
}
|
||||
break;
|
||||
case MENU_LABEL_INPUT_POLL_TYPE_BEHAVIOR:
|
||||
|
@ -439,7 +439,7 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
|
||||
switch (state)
|
||||
{
|
||||
case RUNLOOP_CTL_DATA_ITERATE:
|
||||
task_ctl(TASK_CTL_CHECK, NULL);
|
||||
task_queue_ctl(TASK_CTL_CHECK, NULL);
|
||||
return true;
|
||||
case RUNLOOP_CTL_SHADER_DIR_DEINIT:
|
||||
shader_dir_free(&runloop_shader_dir);
|
||||
@ -973,7 +973,7 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
|
||||
case RUNLOOP_CTL_TASK_INIT:
|
||||
{
|
||||
bool threaded_enable = settings->threaded_data_runloop_enable;
|
||||
task_ctl(TASK_CTL_INIT, &threaded_enable);
|
||||
task_queue_ctl(TASK_CTL_INIT, &threaded_enable);
|
||||
}
|
||||
break;
|
||||
case RUNLOOP_CTL_PREPARE_DUMMY:
|
||||
@ -1011,7 +1011,7 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
|
||||
case RUNLOOP_CTL_IS_EXEC:
|
||||
return runloop_exec;
|
||||
case RUNLOOP_CTL_DATA_DEINIT:
|
||||
task_ctl(TASK_CTL_DEINIT, NULL);
|
||||
task_queue_ctl(TASK_CTL_DEINIT, NULL);
|
||||
break;
|
||||
case RUNLOOP_CTL_IS_CORE_OPTION_UPDATED:
|
||||
if (!runloop_system.core_options)
|
||||
|
@ -607,7 +607,7 @@ bool rarch_task_push_dbscan(const char *fullpath,
|
||||
if (db->handle)
|
||||
db->handle->status = DATABASE_STATUS_ITERATE_BEGIN;
|
||||
|
||||
task_ctl(TASK_CTL_PUSH, t);
|
||||
task_queue_ctl(TASK_CTL_PUSH, t);
|
||||
|
||||
return true;
|
||||
|
||||
|
@ -266,7 +266,7 @@ bool rarch_task_push_decompress(
|
||||
find_data.func = rarch_task_decompress_finder;
|
||||
find_data.userdata = (void*)source_file;
|
||||
|
||||
if (task_ctl(TASK_CTL_FIND, &find_data))
|
||||
if (task_queue_ctl(TASK_CTL_FIND, &find_data))
|
||||
{
|
||||
RARCH_LOG("[decompress] File '%s' already being decompressed.\n",
|
||||
source_file);
|
||||
@ -313,7 +313,7 @@ bool rarch_task_push_decompress(
|
||||
|
||||
t->title = strdup(tmp);
|
||||
|
||||
task_ctl(TASK_CTL_PUSH, t);
|
||||
task_queue_ctl(TASK_CTL_PUSH, t);
|
||||
|
||||
return true;
|
||||
|
||||
|
@ -364,7 +364,7 @@ bool rarch_task_push_image_load(const char *fullpath,
|
||||
t->callback = cb;
|
||||
t->user_data = user_data;
|
||||
|
||||
task_ctl(TASK_CTL_PUSH, t);
|
||||
task_queue_ctl(TASK_CTL_PUSH, t);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ bool rarch_task_push_http_transfer(const char *url, const char *type,
|
||||
find_data.userdata = (void*)url;
|
||||
|
||||
/* Concurrent download of the same file is not allowed */
|
||||
if (task_ctl(TASK_CTL_FIND, &find_data))
|
||||
if (task_queue_ctl(TASK_CTL_FIND, &find_data))
|
||||
{
|
||||
RARCH_LOG("[http] '%s'' is already being downloaded.\n", url);
|
||||
return false;
|
||||
@ -265,7 +265,7 @@ bool rarch_task_push_http_transfer(const char *url, const char *type,
|
||||
|
||||
t->title = strdup(tmp);
|
||||
|
||||
task_ctl(TASK_CTL_PUSH, t);
|
||||
task_queue_ctl(TASK_CTL_PUSH, t);
|
||||
|
||||
return true;
|
||||
|
||||
|
@ -732,7 +732,7 @@ static bool rarch_task_push_overlay_load(const char *overlay_path,
|
||||
t->callback = cb;
|
||||
t->user_data = user_data;
|
||||
|
||||
task_ctl(TASK_CTL_PUSH, t);
|
||||
task_queue_ctl(TASK_CTL_PUSH, t);
|
||||
|
||||
return true;
|
||||
error:
|
||||
|
@ -330,7 +330,7 @@ static struct retro_task_impl impl_threaded = {
|
||||
};
|
||||
#endif
|
||||
|
||||
bool task_ctl(enum task_ctl_state state, void *data)
|
||||
bool task_queue_ctl(enum task_queue_ctl_state state, void *data)
|
||||
{
|
||||
static struct retro_task_impl *impl_current = NULL;
|
||||
static bool task_threaded_enable = false;
|
||||
@ -358,7 +358,7 @@ bool task_ctl(enum task_ctl_state state, void *data)
|
||||
#ifdef HAVE_THREADS
|
||||
if (*boolean_val)
|
||||
{
|
||||
task_ctl(TASK_CTL_SET_THREADED, NULL);
|
||||
task_queue_ctl(TASK_CTL_SET_THREADED, NULL);
|
||||
impl_current = &impl_threaded;
|
||||
}
|
||||
#endif
|
||||
@ -377,13 +377,13 @@ bool task_ctl(enum task_ctl_state state, void *data)
|
||||
{
|
||||
#ifdef HAVE_THREADS
|
||||
bool current_threaded = (impl_current == &impl_threaded);
|
||||
bool want_threaded = task_ctl(TASK_CTL_IS_THREADED, NULL);
|
||||
bool want_threaded = task_queue_ctl(TASK_CTL_IS_THREADED, NULL);
|
||||
|
||||
if (want_threaded != current_threaded)
|
||||
task_ctl(TASK_CTL_DEINIT, NULL);
|
||||
task_queue_ctl(TASK_CTL_DEINIT, NULL);
|
||||
|
||||
if (!impl_current)
|
||||
task_ctl(TASK_CTL_INIT, NULL);
|
||||
task_queue_ctl(TASK_CTL_INIT, NULL);
|
||||
#endif
|
||||
|
||||
impl_current->gather();
|
||||
|
@ -24,7 +24,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum task_ctl_state
|
||||
enum task_queue_ctl_state
|
||||
{
|
||||
TASK_CTL_NONE = 0,
|
||||
|
||||
@ -140,7 +140,7 @@ typedef struct task_finder_data
|
||||
|
||||
void push_task_progress(retro_task_t *task);
|
||||
|
||||
bool task_ctl(enum task_ctl_state state, void *data);
|
||||
bool task_queue_ctl(enum task_queue_ctl_state state, void *data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user