1
0
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:
Ivan Savenko
2025-01-16 15:09:03 +00:00
parent 4a600a9d4c
commit 668bf63fc0
34 changed files with 275 additions and 174 deletions

View File

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