1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

no async for generated images

This commit is contained in:
Laserlicht
2025-08-17 15:46:59 +02:00
parent 182100dfd1
commit c9834c43d6
4 changed files with 21 additions and 1 deletions

View File

@@ -271,7 +271,7 @@ std::shared_ptr<SDLImageShared> SDLImageShared::createScaled(const SDLImageShare
self->upscalingInProgress = false;
};
if(settings["video"]["asyncUpscaling"].Bool())
if(settings["video"]["asyncUpscaling"].Bool() && from->getAsyncUpscale())
ENGINE->async().run(scalingTask);
else
scalingTask();
@@ -284,6 +284,16 @@ bool SDLImageShared::isLoading() const
return upscalingInProgress;
}
void SDLImageShared::setAsyncUpscale(bool on)
{
asyncUpscale = on;
}
bool SDLImageShared::getAsyncUpscale() const
{
return asyncUpscale;
}
std::shared_ptr<const ISharedImage> SDLImageShared::scaleTo(const Point & size, SDL_Palette * palette) const
{
if(upscalingInProgress)