Add config flag for using `InvariantCulture` across all threads
This commit is contained in:
parent
ade8248832
commit
021aefef8a
|
@ -145,6 +145,9 @@ namespace BizHawk.Client.Common
|
||||||
public bool AcceptBackgroundInput { get; set; }
|
public bool AcceptBackgroundInput { get; set; }
|
||||||
public bool AcceptBackgroundInputControllerOnly { get; set; }
|
public bool AcceptBackgroundInputControllerOnly { get; set; }
|
||||||
public bool HandleAlternateKeyboardLayouts { get; set; }
|
public bool HandleAlternateKeyboardLayouts { get; set; }
|
||||||
|
|
||||||
|
public bool SetInvariantCulture { get; set; } = false;
|
||||||
|
|
||||||
public bool SingleInstanceMode { get; set; }
|
public bool SingleInstanceMode { get; set; }
|
||||||
public OpposingDirPolicy OpposingDirPolicy { get; set; }
|
public OpposingDirPolicy OpposingDirPolicy { get; set; }
|
||||||
public bool ShowContextMenu { get; set; } = true;
|
public bool ShowContextMenu { get; set; } = true;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
@ -223,6 +224,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
if (cliFlags.GDIPlusRequested) initialConfig.DispMethod = EDispMethod.GdiPlus;
|
if (cliFlags.GDIPlusRequested) initialConfig.DispMethod = EDispMethod.GdiPlus;
|
||||||
// initialConfig should really be globalConfig as it's mutable
|
// initialConfig should really be globalConfig as it's mutable
|
||||||
|
|
||||||
|
if (initialConfig.SetInvariantCulture)
|
||||||
|
{
|
||||||
|
CultureInfo.CurrentCulture = CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
|
||||||
|
}
|
||||||
|
|
||||||
StringLogUtil.DefaultToDisk = initialConfig.Movies.MoviesOnDisk;
|
StringLogUtil.DefaultToDisk = initialConfig.Movies.MoviesOnDisk;
|
||||||
|
|
||||||
// must be done VERY early, before any SDL_Init calls can be done
|
// must be done VERY early, before any SDL_Init calls can be done
|
||||||
|
|
Loading…
Reference in New Issue