mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
(video_filter.c) Cleanups
This commit is contained in:
parent
ef51ef1fb1
commit
e58f91406f
@ -237,7 +237,8 @@ static bool create_softfilter_graph(rarch_softfilter_t *filt,
|
||||
}
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
if(filt->threads>1){
|
||||
if (filt->threads > 1)
|
||||
{
|
||||
filt->thread_data = (struct filter_thread_data*)
|
||||
calloc(threads, sizeof(*filt->thread_data));
|
||||
if (!filt->thread_data)
|
||||
@ -246,15 +247,15 @@ static bool create_softfilter_graph(rarch_softfilter_t *filt,
|
||||
for (i = 0; i < threads; i++)
|
||||
{
|
||||
filt->thread_data[i].userdata = filt->impl_data;
|
||||
filt->thread_data[i].done = true;
|
||||
filt->thread_data[i].done = true;
|
||||
|
||||
filt->thread_data[i].lock = slock_new();
|
||||
filt->thread_data[i].lock = slock_new();
|
||||
if (!filt->thread_data[i].lock)
|
||||
return false;
|
||||
filt->thread_data[i].cond = scond_new();
|
||||
filt->thread_data[i].cond = scond_new();
|
||||
if (!filt->thread_data[i].cond)
|
||||
return false;
|
||||
filt->thread_data[i].thread = sthread_create(
|
||||
filt->thread_data[i].thread = sthread_create(
|
||||
filter_thread_loop, &filt->thread_data[i]);
|
||||
if (!filt->thread_data[i].thread)
|
||||
return false;
|
||||
@ -276,8 +277,9 @@ static bool append_softfilter_plugs(rarch_softfilter_t *filt,
|
||||
{
|
||||
softfilter_get_implementation_t cb;
|
||||
const struct softfilter_implementation *impl = NULL;
|
||||
struct rarch_soft_plug *new_plugs = NULL;
|
||||
dylib_t lib = dylib_load(list->elems[i].data);
|
||||
struct rarch_soft_plug *new_plugs = NULL;
|
||||
dylib_t lib =
|
||||
dylib_load(list->elems[i].data);
|
||||
|
||||
if (!lib)
|
||||
continue;
|
||||
@ -315,8 +317,8 @@ static bool append_softfilter_plugs(rarch_softfilter_t *filt,
|
||||
RARCH_LOG("[SoftFilter]: Found plug: %s (%s).\n",
|
||||
impl->ident, impl->short_ident);
|
||||
|
||||
filt->plugs = new_plugs;
|
||||
filt->plugs[filt->num_plugs].lib = lib;
|
||||
filt->plugs = new_plugs;
|
||||
filt->plugs[filt->num_plugs].lib = lib;
|
||||
filt->plugs[filt->num_plugs].impl = impl;
|
||||
filt->num_plugs++;
|
||||
}
|
||||
@ -400,11 +402,8 @@ rarch_softfilter_t *rarch_softfilter_new(const char *filter_config,
|
||||
char ext_name[PATH_MAX_LENGTH];
|
||||
#endif
|
||||
struct string_list *plugs = NULL;
|
||||
rarch_softfilter_t *filt = NULL;
|
||||
|
||||
(void)basedir;
|
||||
|
||||
filt = (rarch_softfilter_t*)calloc(1, sizeof(*filt));
|
||||
rarch_softfilter_t *filt = (rarch_softfilter_t*)
|
||||
calloc(1, sizeof(*filt));
|
||||
if (!filt)
|
||||
return NULL;
|
||||
|
||||
@ -477,7 +476,8 @@ void rarch_softfilter_free(rarch_softfilter_t *filt)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
if(filt->threads>1){
|
||||
if (filt->threads > 1)
|
||||
{
|
||||
for (i = 0; i < filt->threads; i++)
|
||||
{
|
||||
if (!filt->thread_data[i].thread)
|
||||
|
Loading…
x
Reference in New Issue
Block a user