Better fix for haptics/feedback prescale

fixes c36b654eb
This commit is contained in:
YoshiRulz 2024-10-09 14:25:46 +10:00
parent c36b654eb9
commit eb3ab3f05a
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 2 additions and 1 deletions

View File

@ -116,9 +116,10 @@ namespace BizHawk.Client.Common
{
foreach (var hostChannel in v.Channels!.Split('+'))
{
const double S32_MAX_AS_F64 = int.MaxValue;
finalHostController.SetHapticChannelStrength(
v.GamepadPrefix + hostChannel,
(v.Prescale * strength).Clamp(min: 0.0f, max: 1.0f).RoundToInt());
(v.Prescale * (double) strength).Clamp(min: 0.0, max: S32_MAX_AS_F64).RoundToInt());
}
}
}