[PATCH v2 2/3] kernel32: Make GetUserGeoID() always succeed if geoclass is valid. (original) (raw)
João Diogo Ferreira devilj at outlook.pt
Mon Dec 2 15:44:57 CST 2019
- Previous message (by thread): [PATCH v2 2/3] kernel32: Make GetUserGeoID() always succeed if geoclass is valid.
- Next message (by thread): [PATCH v2 3/3] kernelbase: Autoset GeoID on process launch.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Forgot the bug line. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46196 (Partial fix: fixes the crashing, but not the country flag in the UI.)
A segunda-feira, 2 de dezembro de 2019 21:39:52 WET João Diogo Ferreira escreveu:
When a GeoID for the requested class is not yet set, Windows 10 v1709+ returns 39070 ("World") as default. This means that native Win32 applications can no longer be reliably tested against GEOIDNOTAVAILABLE, leading to bugs when running them under Wine.
While it's true that we're going to set the ID automatically anyway, we only set one of the classes depending on the locale. This patch makes sure every class returns a good GeoID in all cases. Signed-off-by: João Diogo Craveiro Ferreira <devilj at outlook.pt> --- This is for a single edge case and I don't know if it'll ever happen. --- dlls/kernel32/locale.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c index 7d79cee0c3..52b9a53a80 100644 --- a/dlls/kernel32/locale.c +++ b/dlls/kernel32/locale.c @@ -2812,7 +2812,7 @@ static const struct geoinfot *getgeoinfodataptr(GEOID geoid) */ GEOID WINAPI GetUserGeoID(GEOCLASS geoclass) { - GEOID ret = GEOIDNOTAVAILABLE; + GEOID ret = 39070; static const WCHAR geoW[] = {'G','e','o',0}; static const WCHAR nationW[] = {'N','a','t','i','o','n',0}; static const WCHAR regionW[] = {'R','e','g','i','o','n',0}; @@ -2833,7 +2833,7 @@ GEOID WINAPI GetUserGeoID(GEOCLASS geoclass) break; default: WARN("Unknown geoclass %d\n", geoclass); - return ret; + return GEOIDNOTAVAILABLE; } if (!(hkey = createregistrykey())) return ret; -- 2.24.0
- Previous message (by thread): [PATCH v2 2/3] kernel32: Make GetUserGeoID() always succeed if geoclass is valid.
- Next message (by thread): [PATCH v2 3/3] kernelbase: Autoset GeoID on process launch.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]