Fix invisible crosshair with effective HUD scaling < 1

This commit is contained in:
grorp 2024-04-05 17:07:07 +02:00 committed by sfan5
parent 2d8e4df7bc
commit 9bee6d899b
1 changed files with 1 additions and 1 deletions

View File

@ -801,7 +801,7 @@ void Hud::drawCrosshair()
core::dimension2di orig_size(tex->getOriginalSize());
// Integer scaling to avoid artifacts, floor instead of round since too
// small looks better than too large in this case.
core::dimension2di scaled_size = orig_size * std::floor(m_scale_factor);
core::dimension2di scaled_size = orig_size * std::max(std::floor(m_scale_factor), 1.0f);
core::rect<s32> src_rect(orig_size);
core::position2d pos(m_displaycenter.X - scaled_size.Width / 2,