From 9873ec58b7302ce65eee04d6bb5210ee99c56615 Mon Sep 17 00:00:00 2001 From: Maximilian Seidler <78690852+PaideiaDilemma@users.noreply.github.com> Date: Wed, 3 Jul 2024 19:31:16 +0200 Subject: [PATCH] asyncResourceGatherer: add dma frames before starting the asyncLoopThread (#394) --- src/renderer/AsyncResourceGatherer.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/renderer/AsyncResourceGatherer.cpp b/src/renderer/AsyncResourceGatherer.cpp index 19781d8..c73308c 100644 --- a/src/renderer/AsyncResourceGatherer.cpp +++ b/src/renderer/AsyncResourceGatherer.cpp @@ -12,12 +12,6 @@ #include "../helpers/Webp.hpp" CAsyncResourceGatherer::CAsyncResourceGatherer() { - asyncLoopThread = std::thread([this]() { - this->gather(); /* inital gather */ - this->asyncAssetSpinLock(); - }); - asyncLoopThread.detach(); - // some things can't be done async :( // gather background textures when needed @@ -54,6 +48,12 @@ CAsyncResourceGatherer::CAsyncResourceGatherer() { dmas.emplace_back(std::make_unique(PMONITOR)); } + + asyncLoopThread = std::thread([this]() { + this->gather(); /* inital gather */ + this->asyncAssetSpinLock(); + }); + asyncLoopThread.detach(); } SPreloadedAsset* CAsyncResourceGatherer::getAssetByID(const std::string& id) {