diff --git a/core/core.c b/core/core.c index 574d3b59..8f813c7c 100644 --- a/core/core.c +++ b/core/core.c @@ -21,10 +21,11 @@ static bool core_defragment(void *data) void core_init(int *argc, char ***argv, struct core_init_data *init) { #ifdef CONFIG_TESTING - idle_init_sync(); -#else - idle_init(); + if (init->idle_async == false) + idle_init_sync(); + else #endif /* CONFIG_TESTING */ + idle_init(); settings_init(); tags_init(); playlist_init(init->playlist_ops); diff --git a/include/core/core.h b/include/core/core.h index 18f848d5..803037cf 100644 --- a/include/core/core.h +++ b/include/core/core.h @@ -9,6 +9,9 @@ struct core_init_data { struct queue_ops *playlist_ops; struct audio_ops *audio_ops; +#ifdef CONFIG_TESTING + bool idle_async; +#endif /* CONFIG_TESTING */ };