ensure ClockRate in the Bk2Header uses . instead of ,
This commit is contained in:
parent
c8d4e606af
commit
dd33e92a9f
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
using BizHawk.Common;
|
using BizHawk.Common;
|
||||||
|
@ -79,7 +80,7 @@ namespace BizHawk.Client.Common
|
||||||
if (Emulator is ICycleTiming cycleCore)
|
if (Emulator is ICycleTiming cycleCore)
|
||||||
{
|
{
|
||||||
Header[HeaderKeys.CycleCount] = cycleCore.CycleCount.ToString();
|
Header[HeaderKeys.CycleCount] = cycleCore.CycleCount.ToString();
|
||||||
Header[HeaderKeys.ClockRate] = cycleCore.ClockRate.ToString();
|
Header[HeaderKeys.ClockRate] = cycleCore.ClockRate.ToString(CultureInfo.InvariantCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using BizHawk.Emulation.Common;
|
using BizHawk.Emulation.Common;
|
||||||
using BizHawk.Emulation.Cores;
|
|
||||||
|
|
||||||
namespace BizHawk.Client.Common
|
namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
|
@ -74,7 +74,7 @@ namespace BizHawk.Client.Common
|
||||||
if (Header.TryGetValue(HeaderKeys.CycleCount, out var numCyclesStr) && Header.TryGetValue(HeaderKeys.ClockRate, out var clockRateStr))
|
if (Header.TryGetValue(HeaderKeys.CycleCount, out var numCyclesStr) && Header.TryGetValue(HeaderKeys.ClockRate, out var clockRateStr))
|
||||||
{
|
{
|
||||||
var numCycles = Convert.ToUInt64(numCyclesStr);
|
var numCycles = Convert.ToUInt64(numCyclesStr);
|
||||||
var clockRate = Convert.ToDouble(clockRateStr);
|
var clockRate = Convert.ToDouble(clockRateStr, CultureInfo.InvariantCulture);
|
||||||
dblSeconds = numCycles / clockRate;
|
dblSeconds = numCycles / clockRate;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue