Skip to content

Commit

Permalink
Fix invisible crosshair with effective HUD scaling < 1
Browse files Browse the repository at this point in the history
  • Loading branch information
grorp authored and sfan5 committed Apr 6, 2024
1 parent 2d8e4df commit 9bee6d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/hud.cpp
Expand Up @@ -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,
Expand Down

0 comments on commit 9bee6d8

Please sign in to comment.