mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-11-16 23:05:58 +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"
|
#include "../helpers/Webp.hpp"
|
||||||
|
|
||||||
CAsyncResourceGatherer::CAsyncResourceGatherer() {
|
CAsyncResourceGatherer::CAsyncResourceGatherer() {
|
||||||
asyncLoopThread = std::thread([this]() {
|
|
||||||
this->gather(); /* inital gather */
|
|
||||||
this->asyncAssetSpinLock();
|
|
||||||
});
|
|
||||||
asyncLoopThread.detach();
|
|
||||||
|
|
||||||
// some things can't be done async :(
|
// some things can't be done async :(
|
||||||
// gather background textures when needed
|
// gather background textures when needed
|
||||||
|
|
||||||
|
@ -54,6 +48,12 @@ CAsyncResourceGatherer::CAsyncResourceGatherer() {
|
||||||
|
|
||||||
dmas.emplace_back(std::make_unique<CDMAFrame>(PMONITOR));
|
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) {
|
SPreloadedAsset* CAsyncResourceGatherer::getAssetByID(const std::string& id) {
|
||||||
|
|
Loading…
Reference in a new issue