Skip to content

Commit b69bc1f

Browse files
committed
UI: Fixed broken game previews for some systems
If a dot is used as the "thousand separator", the parsing produced a large value that made it look like the preview was blank
1 parent daebb7a commit b69bc1f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

UI/Controls/StateGridEntry.axaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using Mesen.Utilities;
1010
using Mesen.ViewModels;
1111
using System;
12+
using System.Globalization;
1213
using System.IO;
1314
using System.IO.Compression;
1415
using System.Threading.Tasks;
@@ -152,7 +153,7 @@ public void Init()
152153
string? line = null;
153154
while((line = reader.ReadLine()) != null) {
154155
if(line.StartsWith("aspectratio=")) {
155-
double.TryParse(line.Split('=')[1], out aspectRatio);
156+
double.TryParse(line.Split('=')[1], CultureInfo.InvariantCulture, out aspectRatio);
156157
break;
157158
}
158159
}

0 commit comments

Comments
 (0)