Don't do checked decimal -> float/double conversions

fixes exception on viewing movie info with Arcade movies
This commit is contained in:
CasualPokePlayer 2025-01-16 09:57:43 -08:00
parent 87a740d09a
commit 6c4cea23e6
3 changed files with 4 additions and 4 deletions

View File

@ -72,7 +72,7 @@ namespace BizHawk.Client.Common
const decimal attosInSec = 1_000_000_000_000_000_000.0M; const decimal attosInSec = 1_000_000_000_000_000_000.0M;
var m = attosInSec; var m = attosInSec;
m /= ulong.Parse(vsyncAttoStr); m /= ulong.Parse(vsyncAttoStr);
return m.ConvertToF64(); return decimal.ToDouble(m);
} }
return PlatformFrameRates.GetFrameRate(SystemID, IsPal); return PlatformFrameRates.GetFrameRate(SystemID, IsPal);

View File

@ -23,7 +23,7 @@ namespace BizHawk.Client.EmuHawk
public double Probability public double Probability
{ {
get => ProbabilityUpDown.Value.ConvertToF64(); get => decimal.ToDouble(ProbabilityUpDown.Value);
set => ProbabilityUpDown.Value = new(value); set => ProbabilityUpDown.Value = new(value);
} }

View File

@ -196,7 +196,7 @@ namespace BizHawk.Client.EmuHawk
XNumeric.Value = XNumeric.Maximum; XNumeric.Value = XNumeric.Maximum;
} }
_stickyHoldController.SetAxisHold(XName, (XNumeric.Value.ConvertToF32() * MultiplierX).RoundToInt()); _stickyHoldController.SetAxisHold(XName, (decimal.ToSingle(XNumeric.Value) * MultiplierX).RoundToInt());
_isSet = true; _isSet = true;
} }
} }
@ -218,7 +218,7 @@ namespace BizHawk.Client.EmuHawk
YNumeric.Value = YNumeric.Maximum; YNumeric.Value = YNumeric.Maximum;
} }
_stickyHoldController.SetAxisHold(YName, (YNumeric.Value.ConvertToF32() * MultiplierY).RoundToInt()); _stickyHoldController.SetAxisHold(YName, (decimal.ToSingle(YNumeric.Value) * MultiplierY).RoundToInt());
_isSet = true; _isSet = true;
} }
} }