Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config flag for using InvariantCulture across all threads #3982

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/BizHawk.Client.Common/config/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -438,5 +438,7 @@ public void SetWindowScaleFor(string sysID, int windowScale)
public int AVWriterResizeHeight { get; set; } = 0;

public int AVWriterResizeWidth { get; set; } = 0;

public bool SetInvariantCulture { get; set; } = false;
}
}
7 changes: 7 additions & 0 deletions src/BizHawk.Client.EmuHawk/Program.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -183,6 +184,12 @@ private static int SubMain(string[] args)
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
Expand Down