Sprite: Don't allocate sprite encode space for map-mode zoom levels

This commit is contained in:
Jonathan G Rennison
2023-08-21 23:19:26 +01:00
parent d6f01988e3
commit 785216db73
10 changed files with 22 additions and 19 deletions

View File

@@ -30,8 +30,8 @@ Sprite *Blitter_32bppSSE_Base::Encode(const SpriteLoader::Sprite *sprite, Alloca
ZoomLevel zoom_max = ZOOM_LVL_NORMAL;
if (sprite->type != SpriteType::Font) {
zoom_min = _settings_client.gui.zoom_min;
zoom_max = _settings_client.gui.zoom_max;
if (zoom_max == zoom_min) zoom_max = ZOOM_LVL_MAX;
zoom_max = (ZoomLevel) std::min(_settings_client.gui.zoom_max, ZOOM_LVL_DRAW_SPR);
if (zoom_max == zoom_min) zoom_max = ZOOM_LVL_DRAW_SPR;
}
/* Calculate sizes and allocate. */