mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-26 19:14:20 +01:00
Fix setting UI culture for other threads
This commit is contained in:
parent
a794d2c718
commit
60916e1080
@ -122,14 +122,12 @@ namespace DS4Windows
|
||||
|
||||
public static void SetCulture(string culture)
|
||||
{
|
||||
foreach (Thread t in new Thread[] { Thread.CurrentThread, controlThread })
|
||||
try
|
||||
{
|
||||
if (t != null && !t.CurrentUICulture.Equals(culture))
|
||||
{
|
||||
try { t.CurrentUICulture = CultureInfo.GetCultureInfo(culture); }
|
||||
catch { /* Skip setting culture that we cannot set */ }
|
||||
}
|
||||
Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(culture);
|
||||
CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.GetCultureInfo(culture);
|
||||
}
|
||||
catch { /* Skip setting culture that we cannot set */ }
|
||||
}
|
||||
|
||||
private static void createControlService()
|
||||
|
Loading…
Reference in New Issue
Block a user