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:
Maximilian Seidler 2025-03-06 08:25:53 +01:00 committed by GitHub
parent 9f37c1c8e9
commit cb1c504b38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;