diff --git a/src/BizHawk.Client.Common/config/Config.cs b/src/BizHawk.Client.Common/config/Config.cs index c0daeb3b1b..1c7a24fefc 100644 --- a/src/BizHawk.Client.Common/config/Config.cs +++ b/src/BizHawk.Client.Common/config/Config.cs @@ -438,5 +438,7 @@ namespace BizHawk.Client.Common public int AVWriterResizeHeight { get; set; } = 0; public int AVWriterResizeWidth { get; set; } = 0; + + public bool SetInvariantCulture { get; set; } = false; } } diff --git a/src/BizHawk.Client.EmuHawk/Program.cs b/src/BizHawk.Client.EmuHawk/Program.cs index 2b2c151dbc..c04105a3d0 100644 --- a/src/BizHawk.Client.EmuHawk/Program.cs +++ b/src/BizHawk.Client.EmuHawk/Program.cs @@ -1,6 +1,7 @@ using System.Diagnostics; using System.IO; using System.Collections.Generic; +using System.Globalization; using System.Linq; using System.Reflection; using System.Runtime.InteropServices; @@ -183,6 +184,12 @@ namespace BizHawk.Client.EmuHawk if (initialConfig.SaveSlot is 0) initialConfig.SaveSlot = 10; //TODO remove after a while // initialConfig should really be globalConfig as it's mutable + //TODO ideally this should happen as early as possible, which means parsing the config earlier, which means parsing the command-line flags earlier... actually there's not that much else above this --yoshi + if (initialConfig.SetInvariantCulture) + { + CultureInfo.CurrentCulture = CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture; + } + StringLogUtil.DefaultToDisk = initialConfig.Movies.MoviesOnDisk; // must be done VERY early, before any SDL_Init calls can be done