From 58213f353482e344c3332a95dd1fc26a3bd91907 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Fri, 17 Jan 2025 04:48:50 +1000 Subject: [PATCH] Undo unrelated changes from previous commit partially reverts 6c4cea23e --- src/BizHawk.Client.Common/movie/BasicMovieInfo.cs | 1 - src/BizHawk.Client.EmuHawk/tools/BasicBot/BotControlsRow.cs | 2 +- .../tools/VirtualPads/controls/VirtualPadTargetScreen.cs | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/BizHawk.Client.Common/movie/BasicMovieInfo.cs b/src/BizHawk.Client.Common/movie/BasicMovieInfo.cs index 407e30c7e8..b9172fa585 100644 --- a/src/BizHawk.Client.Common/movie/BasicMovieInfo.cs +++ b/src/BizHawk.Client.Common/movie/BasicMovieInfo.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Globalization; using System.IO; -using BizHawk.Common.NumberExtensions; using BizHawk.Common.StringExtensions; using BizHawk.Emulation.Common; diff --git a/src/BizHawk.Client.EmuHawk/tools/BasicBot/BotControlsRow.cs b/src/BizHawk.Client.EmuHawk/tools/BasicBot/BotControlsRow.cs index 5835cc8d3c..d4217c7d16 100644 --- a/src/BizHawk.Client.EmuHawk/tools/BasicBot/BotControlsRow.cs +++ b/src/BizHawk.Client.EmuHawk/tools/BasicBot/BotControlsRow.cs @@ -23,7 +23,7 @@ namespace BizHawk.Client.EmuHawk public double Probability { - get => decimal.ToDouble(ProbabilityUpDown.Value); + get => ProbabilityUpDown.Value.ConvertToF64(); set => ProbabilityUpDown.Value = new(value); } diff --git a/src/BizHawk.Client.EmuHawk/tools/VirtualPads/controls/VirtualPadTargetScreen.cs b/src/BizHawk.Client.EmuHawk/tools/VirtualPads/controls/VirtualPadTargetScreen.cs index e32207b750..e57e9c858b 100644 --- a/src/BizHawk.Client.EmuHawk/tools/VirtualPads/controls/VirtualPadTargetScreen.cs +++ b/src/BizHawk.Client.EmuHawk/tools/VirtualPads/controls/VirtualPadTargetScreen.cs @@ -196,7 +196,7 @@ namespace BizHawk.Client.EmuHawk XNumeric.Value = XNumeric.Maximum; } - _stickyHoldController.SetAxisHold(XName, (decimal.ToSingle(XNumeric.Value) * MultiplierX).RoundToInt()); + _stickyHoldController.SetAxisHold(XName, (XNumeric.Value.ConvertToF32() * MultiplierX).RoundToInt()); _isSet = true; } } @@ -218,7 +218,7 @@ namespace BizHawk.Client.EmuHawk YNumeric.Value = YNumeric.Maximum; } - _stickyHoldController.SetAxisHold(YName, (decimal.ToSingle(YNumeric.Value) * MultiplierY).RoundToInt()); + _stickyHoldController.SetAxisHold(YName, (YNumeric.Value.ConvertToF32() * MultiplierY).RoundToInt()); _isSet = true; } }