Browse Source

core: Add a field to initdata for enabling async idle tasks

I'll use this when testing gui album art to enable fetching the artwork.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
next
Anna 5 years ago
parent
commit
7fbef057bf
  1. 7
      core/core.c
  2. 3
      include/core/core.h

7
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);

3
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 */
};

Loading…
Cancel
Save