mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Remove access to internal surface of Canvas
This commit is contained in:
@@ -268,7 +268,7 @@ std::shared_ptr<const ISharedImage> SDLImageShared::scaleTo(const Point & size,
|
||||
if (palette && surf->format->palette)
|
||||
SDL_SetSurfacePalette(surf, palette);
|
||||
|
||||
auto scaled = CSDL_Ext::scaleSurface(surf, (int)(surf->w * scaleX), (int)(surf->h * scaleY));
|
||||
auto scaled = CSDL_Ext::scaleSurface(surf, (int)(surf->w * scaleX), (int)(surf->h * scaleY), EScalingAlgorithm::BILINEAR);
|
||||
|
||||
if (scaled->format && scaled->format->palette) // fix color keying, because SDL loses it at this point
|
||||
CSDL_Ext::setColorKey(scaled, scaled->format->palette->colors[0]);
|
||||
|
||||
Reference in New Issue
Block a user