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