mirror of
https://github.com/hyprwm/hyprlock.git
synced 2025-05-12 21:30:37 +01:00
image: set resourceId in configure (#701)
Fixes a regression caused by #686 (Images don't render cause of a missing resourceId)
This commit is contained in:
parent
9f37c1c8e9
commit
cb1c504b38
1 changed files with 3 additions and 2 deletions
|
@ -101,7 +101,8 @@ void CImage::configure(const std::unordered_map<std::string, std::any>& props, c
|
|||
RASSERT(false, "Missing propperty for CImage: {}", e.what()); //
|
||||
}
|
||||
|
||||
angle = angle * M_PI / 180.0;
|
||||
resourceID = "image:" + path;
|
||||
angle = angle * M_PI / 180.0;
|
||||
|
||||
if (reloadTime > -1) {
|
||||
try {
|
||||
|
@ -123,7 +124,7 @@ void CImage::reset() {
|
|||
|
||||
imageFB.release();
|
||||
|
||||
if (asset)
|
||||
if (asset && reloadTime > -1) // Don't unload asset if it's a static image
|
||||
g_pRenderer->asyncResourceGatherer->unloadAsset(asset);
|
||||
|
||||
asset = nullptr;
|
||||
|
|
Loading…
Reference in a new issue