mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-12-22 13:29:48 +01:00
asyncResourceGatherer: add dma frames before starting the asyncLoopThread (#394)
This commit is contained in:
parent
88b9ce48ed
commit
9873ec58b7
1 changed files with 6 additions and 6 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue