Skip to content

Commit 6c4cea2

Browse files
Don't do checked decimal -> float/double conversions
fixes exception on viewing movie info with Arcade movies
1 parent 87a740d commit 6c4cea2

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/BizHawk.Client.Common/movie/BasicMovieInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public double FrameRate
7272
const decimal attosInSec = 1_000_000_000_000_000_000.0M;
7373
var m = attosInSec;
7474
m /= ulong.Parse(vsyncAttoStr);
75-
return m.ConvertToF64();
75+
return decimal.ToDouble(m);
7676
}
7777

7878
return PlatformFrameRates.GetFrameRate(SystemID, IsPal);

src/BizHawk.Client.EmuHawk/tools/BasicBot/BotControlsRow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public string ButtonName
2323

2424
public double Probability
2525
{
26-
get => ProbabilityUpDown.Value.ConvertToF64();
26+
get => decimal.ToDouble(ProbabilityUpDown.Value);
2727
set => ProbabilityUpDown.Value = new(value);
2828
}
2929

src/BizHawk.Client.EmuHawk/tools/VirtualPads/controls/VirtualPadTargetScreen.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public int X
196196
XNumeric.Value = XNumeric.Maximum;
197197
}
198198

199-
_stickyHoldController.SetAxisHold(XName, (XNumeric.Value.ConvertToF32() * MultiplierX).RoundToInt());
199+
_stickyHoldController.SetAxisHold(XName, (decimal.ToSingle(XNumeric.Value) * MultiplierX).RoundToInt());
200200
_isSet = true;
201201
}
202202
}
@@ -218,7 +218,7 @@ public int Y
218218
YNumeric.Value = YNumeric.Maximum;
219219
}
220220

221-
_stickyHoldController.SetAxisHold(YName, (YNumeric.Value.ConvertToF32() * MultiplierY).RoundToInt());
221+
_stickyHoldController.SetAxisHold(YName, (decimal.ToSingle(YNumeric.Value) * MultiplierY).RoundToInt());
222222
_isSet = true;
223223
}
224224
}

0 commit comments

Comments
 (0)