mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
Fixed two MSVC compiler warnings.
This commit is contained in:
parent
66e1c4e897
commit
a68bdcec30
|
@ -100,11 +100,12 @@ void ScrollableContainer::update(int deltaTime)
|
|||
|
||||
// Adjust the scrolling speed based on the width of the container.
|
||||
float widthModifier = contentSize.x() / static_cast<float>(Renderer::getScreenWidth());
|
||||
adjustedAutoScrollSpeed *= widthModifier;
|
||||
adjustedAutoScrollSpeed = static_cast<int>(adjustedAutoScrollSpeed * widthModifier);
|
||||
|
||||
// Also adjust the scrolling speed based on the size of the font.
|
||||
float fontSizeModifier = mSmallFontSize / mFontSize;
|
||||
adjustedAutoScrollSpeed *= fontSizeModifier * fontSizeModifier;
|
||||
adjustedAutoScrollSpeed = static_cast<int>(adjustedAutoScrollSpeed *
|
||||
fontSizeModifier * fontSizeModifier);
|
||||
|
||||
if (adjustedAutoScrollSpeed < 0)
|
||||
adjustedAutoScrollSpeed = 1;
|
||||
|
|
Loading…
Reference in a new issue