possibly fix crash in GB GPU debugger on operating systems using the wrong language (untested)

This commit is contained in:
zeromus 2016-04-15 20:12:01 -05:00
parent 111648cf98
commit b82cc74a5d
1 changed files with 2 additions and 2 deletions

View File

@ -331,7 +331,7 @@ namespace BizHawk.Client.EmuHawk
else if (!(val is bool) && prop.PropertyType.IsPrimitive) else if (!(val is bool) && prop.PropertyType.IsPrimitive)
{ {
// numeric constanst are similarly hosed // numeric constanst are similarly hosed
val = Convert.ChangeType(val, prop.PropertyType); val = Convert.ChangeType(val, prop.PropertyType, System.Globalization.CultureInfo.InvariantCulture);
} }
prop.SetValue(tool, val, null); prop.SetValue(tool, val, null);
} }
@ -345,7 +345,7 @@ namespace BizHawk.Client.EmuHawk
data.Clear(); data.Clear();
foreach (var prop in props) foreach (var prop in props)
{ {
data.Add(prop.Name, prop.GetValue(tool, null)); data.Add(prop.Name, prop.GetValue(tool, BindingFlags.GetProperty, Type.DefaultBinder, null, System.Globalization.CultureInfo.InvariantCulture));
} }
} }