diff --git a/src/runtime.cpp b/src/runtime.cpp index 41e6cd89..fe8ca041 100644 --- a/src/runtime.cpp +++ b/src/runtime.cpp @@ -67,7 +67,7 @@ monitor * findMonitorFromWindowID(Computer *comp, unsigned id, std::string* side } void* queueTask(const std::function& func, void* arg, bool async) { - if (std::this_thread::get_id() == mainThreadID && !async) return func(arg); + if (std::this_thread::get_id() == mainThreadID && (!async || taskQueue.locked())) return func(arg); TaskQueueItem * task = new TaskQueueItem; task->func = func; task->data = arg; diff --git a/vcpkg.json b/vcpkg.json index f219524f..c363e8da 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -32,7 +32,7 @@ { "name": "sdl2-mixer", "default-features": true, - "features": [ "libmodplug", "opusfile", "fluidsynth" ] + "features": [ "libmodplug", "opusfile", "fluidsynth", "libflac", "mpg123" ] } ] },