1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Moved image scaling & optimization logic to separate classes

This commit is contained in:
Ivan Savenko
2025-01-21 16:36:57 +00:00
parent 68bac73632
commit 391986e0ba
14 changed files with 345 additions and 222 deletions

View File

@@ -248,10 +248,11 @@ std::shared_ptr<SDLImageShared> RenderHandler::loadScaledImage(const ImageLocato
pathToLoad = *remappedLocator.image;
}
if(!locator.image)
return nullptr;
if(locator.image)
pathToLoad = *locator.image;
pathToLoad = *locator.image;
if (pathToLoad.empty())
return nullptr;
std::string imagePathString = pathToLoad.getName();