From 57e60453f6525aa8b8647bc2876f07941dc86935 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Wed, 9 Oct 2024 14:30:48 +1000 Subject: [PATCH] Fix typo fixes d8778aa23 --- src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Controller.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Controller.cs b/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Controller.cs index a30de81703..0dc562840a 100644 --- a/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Controller.cs +++ b/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Controller.cs @@ -305,9 +305,9 @@ namespace BizHawk.Emulation.Cores.Waterbox // so these thunks are called after the frame has advanced _rumblers.Add((c, b) => { - const double S32_MAX_AS_F64 = int.MaxValue; + const double SCALE_FACTOR = (double) int.MaxValue / (double) byte.MaxValue; static int Scale(byte b) - => (b * S32_MAX_AS_F64).RoundToInt(); + => (b * SCALE_FACTOR).RoundToInt(); //TODO double-check order c.SetHapticChannelStrength(nameRight, Scale(b[byteStart])); c.SetHapticChannelStrength(nameLeft, Scale(b[byteStart + 1]));