diff --git a/d3d9ex/AutoFix.cpp b/d3d9ex/AutoFix.cpp index e6a3383..ee93d95 100644 --- a/d3d9ex/AutoFix.cpp +++ b/d3d9ex/AutoFix.cpp @@ -412,7 +412,7 @@ void MainContext::FF13_2_CreateSetFrameRateCodeBlock() } void MainContext::PrintVersionInfo() { - PrintLog("FF13Fix 1.5.0 https://github.com/rebtd7/FF13Fix"); + PrintLog("FF13Fix 1.5.1 https://github.com/rebtd7/FF13Fix"); } bool MainContext::AreAlmostTheSame(float a, float b) { diff --git a/d3d9ex/XInputManager.cpp b/d3d9ex/XInputManager.cpp index f34a59e..338c166 100644 --- a/d3d9ex/XInputManager.cpp +++ b/d3d9ex/XInputManager.cpp @@ -48,8 +48,8 @@ void XInputManager::VibrationLoop() const float vibrationStrengthLowFrequency = *vibration_address_low_frequency; const float vibrationStrengthHighFrequency = *vibration_address_high_frequency; if (vibrationStrengthLowFrequency > 0.01f || vibrationStrengthHighFrequency > 0.01f) { - const WORD leftMotorVibration = std::min((WORD)(vibrationStrengthFactor * vibrationStrengthLowFrequency * maxVibrationStrength), maxVibrationStrength); - const WORD rightMotorVibration = std::min((WORD)(vibrationStrengthFactor * vibrationStrengthHighFrequency * maxVibrationStrength), maxVibrationStrength); + const WORD leftMotorVibration = (WORD) (std::min(vibrationStrengthFactor * vibrationStrengthLowFrequency, 1.0f) * maxVibrationStrength); + const WORD rightMotorVibration = (WORD) (std::min(vibrationStrengthFactor * vibrationStrengthHighFrequency, 1.0f) * maxVibrationStrength); SetControllerVibration(leftMotorVibration, rightMotorVibration); wasVibrating = true; }