background: fix typo in calcs

This commit is contained in:
Vaxry 2024-02-20 16:02:40 +00:00
parent e1aac7e135
commit 11a6213c36

View file

@ -25,7 +25,7 @@ bool CBackground::draw(const SRenderData& data) {
Vector2D size = asset->texture.m_vSize; Vector2D size = asset->texture.m_vSize;
float scaleX = viewport.x / asset->texture.m_vSize.x; float scaleX = viewport.x / asset->texture.m_vSize.x;
float scaleY = viewport.y / asset->texture.m_vSize.x; float scaleY = viewport.y / asset->texture.m_vSize.y;
texbox.w *= std::max(scaleX, scaleY); texbox.w *= std::max(scaleX, scaleY);
texbox.h *= std::max(scaleX, scaleY); texbox.h *= std::max(scaleX, scaleY);