some fixes

Fixed duration and love naming conventions.
This commit is contained in:
Er2
2022-08-20 18:30:32 +03:00
parent 7c9d6d5694
commit 53b20b1341
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -515,7 +515,7 @@ bool Joystick::setVibration(float left, float right, float duration)
Uint32 length = SDL_HAPTIC_INFINITY;
if (duration >= 0.0f)
{
float maxduration = std::numeric_limits<Uint32>::max() / 1000;
float maxduration = (float) (std::numeric_limits<Uint32>::max() / 1000.0);
length = Uint32(std::min(duration, maxduration) * 1000);
}