Don't do checked decimal -> float/double conversions
fixes exception on viewing movie info with Arcade movies
This commit is contained in:
parent
87a740d09a
commit
6c4cea23e6
|
@ -72,7 +72,7 @@ namespace BizHawk.Client.Common
|
|||
const decimal attosInSec = 1_000_000_000_000_000_000.0M;
|
||||
var m = attosInSec;
|
||||
m /= ulong.Parse(vsyncAttoStr);
|
||||
return m.ConvertToF64();
|
||||
return decimal.ToDouble(m);
|
||||
}
|
||||
|
||||
return PlatformFrameRates.GetFrameRate(SystemID, IsPal);
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public double Probability
|
||||
{
|
||||
get => ProbabilityUpDown.Value.ConvertToF64();
|
||||
get => decimal.ToDouble(ProbabilityUpDown.Value);
|
||||
set => ProbabilityUpDown.Value = new(value);
|
||||
}
|
||||
|
||||
|
|
|
@ -196,7 +196,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
XNumeric.Value = XNumeric.Maximum;
|
||||
}
|
||||
|
||||
_stickyHoldController.SetAxisHold(XName, (XNumeric.Value.ConvertToF32() * MultiplierX).RoundToInt());
|
||||
_stickyHoldController.SetAxisHold(XName, (decimal.ToSingle(XNumeric.Value) * MultiplierX).RoundToInt());
|
||||
_isSet = true;
|
||||
}
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
YNumeric.Value = YNumeric.Maximum;
|
||||
}
|
||||
|
||||
_stickyHoldController.SetAxisHold(YName, (YNumeric.Value.ConvertToF32() * MultiplierY).RoundToInt());
|
||||
_stickyHoldController.SetAxisHold(YName, (decimal.ToSingle(YNumeric.Value) * MultiplierY).RoundToInt());
|
||||
_isSet = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue