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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user