Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=46196 Signed-off-by: João Diogo Craveiro Ferreira devilj@outlook.pt --- Supersedes: 174002, 173827 --- dlls/kernelbase/locale.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c index 512c3aeeb1..2e40fc166d 100644 --- a/dlls/kernelbase/locale.c +++ b/dlls/kernelbase/locale.c @@ -108,6 +108,7 @@ void init_locale(void) { LCID lcid = GetUserDefaultLCID(); WCHAR bufferW[80]; + GEOID geoid = GEOID_NOT_AVAILABLE; DWORD count, i; HKEY hkey;
@@ -147,6 +148,11 @@ void init_locale(void) (BYTE *)bufferW, (lstrlenW(bufferW) + 1) * sizeof(WCHAR) ); }
+ GetLocaleInfoW( LOCALE_USER_DEFAULT, LOCALE_IGEOID | LOCALE_RETURN_NUMBER, + (WCHAR *)&geoid, sizeof(geoid)/sizeof(WCHAR) ); + + SetUserGeoID(geoid); + if (!RegCreateKeyExW( nls_key, L"Codepage", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey, NULL )) {
This forces Wine to update its registry values after changing the init_locale() function in kernelbase or updating the NLS files.
Signed-off-by: João Diogo Craveiro Ferreira devilj@outlook.pt --- loader/wine.inf.in | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/loader/wine.inf.in b/loader/wine.inf.in index 19c034d7fd..3d7a489d53 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -31,6 +31,7 @@ RegisterDlls=RegisterDllsSection WineFakeDlls=FakeDllsWin32,FakeDlls UpdateInis=SystemIni CopyFiles=l_intl_section, inf_section +DelReg=International AddReg=\ Classes,\ ContentIndex,\ @@ -55,6 +56,7 @@ RegisterDlls=RegisterDllsSection WineFakeDlls=FakeDllsWin32,FakeDlls UpdateInis=SystemIni CopyFiles=l_intl_section, inf_section +DelReg=International AddReg=\ Classes,\ ContentIndex,\ @@ -81,6 +83,7 @@ WineFakeDlls=FakeDllsWin64,FakeDlls WinePreInstall=Wow64 UpdateInis=SystemIni CopyFiles=l_intl_section, inf_section +DelReg=International AddReg=\ Classes,\ ContentIndex,\ @@ -108,6 +111,7 @@ WineFakeDlls=FakeDllsWin64,FakeDlls WinePreInstall=Wow64 UpdateInis=SystemIni CopyFiles=l_intl_section, inf_section +DelReg=International AddReg=\ Classes,\ ContentIndex,\ @@ -657,6 +661,9 @@ HKLM,%FontSubStr%,"Times New Roman Greek,161",,"Times New Roman,161" HKLM,%FontSubStr%,"Times New Roman TUR,162",,"Times New Roman,162" HKLM,System\CurrentControlSet\Hardware Profiles\Current\Software\Fonts,"LogPixels",0x10003,0x00000060
+[International] +HKCU,Control Panel\International + [MCI] HKLM,%Mci32Str%,"AVIVideo",,"mciavi32.dll" HKLM,%Mci32Str%,"CDAudio",,"mcicda.dll"
João Diogo Ferreira devilj@outlook.pt writes:
This forces Wine to update its registry values after changing the init_locale() function in kernelbase or updating the NLS files.
You don't want to do that. This data should only be touched when the locale has changed, to allow the user to customize it if necessary.
Hi all,
Just to let you know that, regardless of my follow-up patch getting rejected (the one to purge the Int'l regkey), I still think this patch (quoted) is the easiest and least intrusive way to fix the bug.
Of course, one flaw is that it would only apply after changing LANG or when creating a new prefix. There are ways around this, but those would introduce divergences from Windows which might be unwarranted for such an isolated bug affecting only one game (afaik).
I believe this patch should be reviewed as-is. (Though maybe I could have done away with that geoid variable :))
Regards, João Ferreira.
My patch from Saturday, November 23rd, 2019:
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=46196 Signed-off-by: João Diogo Craveiro Ferreira devilj@outlook.pt
Supersedes: 174002, 173827
dlls/kernelbase/locale.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c index 512c3aeeb1..2e40fc166d 100644 --- a/dlls/kernelbase/locale.c +++ b/dlls/kernelbase/locale.c @@ -108,6 +108,7 @@ void init_locale(void) { LCID lcid = GetUserDefaultLCID(); WCHAR bufferW[80];
- GEOID geoid = GEOID_NOT_AVAILABLE; DWORD count, i; HKEY hkey;
@@ -147,6 +148,11 @@ void init_locale(void) (BYTE *)bufferW, (lstrlenW(bufferW) + 1) * sizeof(WCHAR) ); }
- GetLocaleInfoW( LOCALE_USER_DEFAULT, LOCALE_IGEOID | LOCALE_RETURN_NUMBER,
(WCHAR *)&geoid, sizeof(geoid)/sizeof(WCHAR) );
- SetUserGeoID(geoid);
- if (!RegCreateKeyExW( nls_key, L"Codepage", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey, NULL )) {
-- 2.24.0