https://bugs.winehq.org/show_bug.cgi?id=46196
Bug ID: 46196 Summary: Beat Hazard 2: Missing country code and flag Product: Wine Version: 3.21 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: trivial Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: devilj@outlook.pt Distribution: ---
Created attachment 62856 --> https://bugs.winehq.org/attachment.cgi?id=62856 Wine log (snippet)
The user's country flag is replaced with an "Unknown" icon. This happens because the game fails to get the two-digit country code from Wine. The game runs well otherwise; this is merely a UI issue.
The game calls GetUserGeoID, but this returns -1 instead of a valid GeoID. The game never calls SetUserGeoID as far as I can tell!
Wine log snippet generated with +nls,+timestamp,+debugstr,+trace,+relay.
https://bugs.winehq.org/show_bug.cgi?id=46196
--- Comment #1 from Nikolay Sivov bunglehead@gmail.com --- You can set it in registry in HKCU/Controls Panel/International/Geo, value name is Nation. We should probably set it on prefix creation to something sensible.
https://bugs.winehq.org/show_bug.cgi?id=46196
--- Comment #2 from João Ferreira devilj@outlook.pt --- (In reply to Nikolay Sivov from comment #1)
You can set it in registry in HKCU/Controls Panel/International/Geo, value name is Nation. We should probably set it on prefix creation to something sensible.
Many thanks, that fixed it :D
I would like to try to make a patch for it, so I'll leave this bug report open in the meantime.
https://bugs.winehq.org/show_bug.cgi?id=46196
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=46196
--- Comment #3 from João Ferreira devilj@outlook.pt --- What would be the best way to derive a default GeoID?
1. Using locale would be straightforward, but plenty of users set this to their language of choice (often en_US) regardless of where they're living;
2. Using timezone would be more accurate (though some TZs fit multiple countries, this is relatively rare). We can get this through zone1970.tab, but that's not portable;
3. Using a static default (en_US) and/or an environment variable (WINEREGION?)
Also, should this be set on load time (like the locale entries in the registry) or at prefix creation?
I'm new to Linux development. I don't know what's the best practice for this!
https://bugs.winehq.org/show_bug.cgi?id=46196
João Ferreira devilj@outlook.pt changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|trivial |normal
--- Comment #4 from João Ferreira devilj@outlook.pt --- App crashes on some systems if GeoID isn't set; setting importance to normal.
https://bugs.winehq.org/show_bug.cgi?id=46196
--- Comment #5 from Austin English austinenglish@gmail.com --- (In reply to João Ferreira from comment #3)
What would be the best way to derive a default GeoID?
- Using locale would be straightforward, but plenty of users set this to
their language of choice (often en_US) regardless of where they're living;
What's the harm in using en_US got GeoID if locale is set to that but user is not in the US?
https://bugs.winehq.org/show_bug.cgi?id=46196
--- Comment #6 from João Ferreira devilj@outlook.pt --- (In reply to Austin English from comment #5)
What's the harm in using en_US got GeoID if locale is set to that but user is not in the US?
Not much; Chinese users wouldn't see the option to bypass AWS censorship, but there's a command line argument for this. Everyone else just gets the wrong flag.
It's just a minor inconvenience, really.
https://bugs.winehq.org/show_bug.cgi?id=46196
--- Comment #7 from Austin English austinenglish@gmail.com --- (In reply to João Ferreira from comment #6)
(In reply to Austin English from comment #5)
What's the harm in using en_US got GeoID if locale is set to that but user is not in the US?
Not much; Chinese users wouldn't see the option to bypass AWS censorship, but there's a command line argument for this. Everyone else just gets the wrong flag.
It's just a minor inconvenience, really.
If locale is used for the GeoID, you could also override that instead of a command line argument.
IMO, the locale is the closest match and should be used.
https://bugs.winehq.org/show_bug.cgi?id=46196
--- Comment #8 from João Ferreira devilj@outlook.pt --- What would be a good way of opting out of GeoID autodetection? Say, with the registry or winecfg or whatever.
It turns out a lot of countries are not represented in Wine or even Linux locales, particularly former colonies in Africa and Asia, what with their shared languages and such, and I would rather let everyone override as they see fit.
https://bugs.winehq.org/show_bug.cgi?id=46196
João Ferreira devilj@outlook.pt changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Beat Hazard 2: Missing |Beat Hazard 2: Crashing if |country code and flag |no GeoID is set, missing | |country code and flag.
https://bugs.winehq.org/show_bug.cgi?id=46196
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |a31dec5fa9cf148d6ac6aed4c3a | |fc2882170a8e4 Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #9 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Fixed by https://source.winehq.org/git/wine.git/?a=commit;h=a31dec5fa9cf148d6ac6aed4c...
https://bugs.winehq.org/show_bug.cgi?id=46196
--- Comment #10 from João Ferreira devilj@outlook.pt --- Confirming fixed.
Crashing initially fixed by commit https://source.winehq.org/git/wine.git/commit/a31dec5fa9cf148d6ac6aed4c3afc2....
Further fixed country code and flags in commit https://source.winehq.org/git/wine.git/commit/7b1b0ce506be6871e8c3c5f6b837e0....
https://bugs.winehq.org/show_bug.cgi?id=46196
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #11 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.0-rc1.