asyncResourceGatherer: add dma frames before starting the asyncLoopThread (#394)

This commit is contained in:
Maximilian Seidler 2024-07-03 19:31:16 +02:00 committed by GitHub
parent 88b9ce48ed
commit 9873ec58b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 6 deletions

View File

@ -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<CDMAFrame>(PMONITOR));
}
asyncLoopThread = std::thread([this]() {
this->gather(); /* inital gather */
this->asyncAssetSpinLock();
});
asyncLoopThread.detach();
}
SPreloadedAsset* CAsyncResourceGatherer::getAssetByID(const std::string& id) {