From eb3ab3f05a29820701b336c05a4c09c44f258d4a Mon Sep 17 00:00:00 2001
From: YoshiRulz <OSSYoshiRulz+git@gmail.com>
Date: Wed, 9 Oct 2024 14:25:46 +1000
Subject: [PATCH] Better fix for haptics/feedback prescale

fixes c36b654eb
---
 src/BizHawk.Client.Common/Controller.cs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/BizHawk.Client.Common/Controller.cs b/src/BizHawk.Client.Common/Controller.cs
index 6f22d70461..e159e8fd0f 100644
--- a/src/BizHawk.Client.Common/Controller.cs
+++ b/src/BizHawk.Client.Common/Controller.cs
@@ -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());
 					}
 				}
 			}